diff --git a/public/images/posters/histories/1.jpg b/public/images/posters/histories/1.jpg index 8308dbc..0604e1f 100644 Binary files a/public/images/posters/histories/1.jpg and b/public/images/posters/histories/1.jpg differ diff --git a/public/images/posters/histories/3.jpg b/public/images/posters/histories/3.jpg index 0604e1f..8308dbc 100644 Binary files a/public/images/posters/histories/3.jpg and b/public/images/posters/histories/3.jpg differ diff --git a/public/videos/histories/1.mp4 b/public/videos/histories/1.mp4 index d78a349..6dc6636 100644 Binary files a/public/videos/histories/1.mp4 and b/public/videos/histories/1.mp4 differ diff --git a/public/videos/histories/3.mp4 b/public/videos/histories/3.mp4 index 6dc6636..d78a349 100644 Binary files a/public/videos/histories/3.mp4 and b/public/videos/histories/3.mp4 differ diff --git a/src/components/Histories.tsx b/src/components/Histories.tsx index 4a7303e..ed8bfe8 100644 --- a/src/components/Histories.tsx +++ b/src/components/Histories.tsx @@ -9,7 +9,9 @@ import { videos } from "../consts/videos"; function Histories() { const [selectedVideoIndex, setSelectedVideoIndex] = useState(0); - const videoRefs = videos.map(() => createRef()); + const videoRefs = videos + .sort((a, b) => b.id - a.id) + .map(() => createRef()); const [videoWidth, setVideoWidth] = useState(0); const [videoHeigth, setVideoHeigth] = useState(0); const [videoProgesses, setVideoProgresses] = useState([]); diff --git a/src/consts/videos.ts b/src/consts/videos.ts index c975ccc..34ce242 100644 --- a/src/consts/videos.ts +++ b/src/consts/videos.ts @@ -2,29 +2,30 @@ import { Video } from "../types/Video"; export const videos: Video[] = [ { - id: "1", + id: 1, value: "/videos/histories/1.mp4", - title: "Интерактивный комплекс GRAFF.estate для ЖК Upside Towers, Москва", + title: + "Интерактивная инсталляция GRAFF.estate для ЖК DNS City в г. Владивосток", desc: "", poster: "/images/posters/histories/1.jpg", }, { - id: "2", + id: 2, value: "/videos/histories/2.mp4", - title: "Graff.estate на выставке 100+ TechnoBuild", + title: "GRAFF.estate на выставке 100+ TechnoBuild", desc: "", poster: "/images/posters/histories/2.jpg", }, { - id: "3", + id: 3, value: "/videos/histories/3.mp4", - title: - "Интерактивная инсталляция graff.estate для ЖК DNS City в г. Владивосток", + title: "Интерактивный комплекс GRAFF.estate для ЖК Upside Towers, Москва", desc: "", poster: "/images/posters/histories/3.jpg", }, + { - id: "4", + id: 4, value: "/videos/histories/4.mp4", title: "GRAFF.estate на Всероссийском Жилищном конгрессе в Сочи", desc: "", diff --git a/src/types/Video.ts b/src/types/Video.ts index b67da8c..c35959b 100644 --- a/src/types/Video.ts +++ b/src/types/Video.ts @@ -1,7 +1,7 @@ type Video = { + id: number; value: string; poster: string; - id: string; title: string; desc: string; };