feat(frontend): VideoPage react-player v3, fix data.videos, route /video/:id
Some checks failed
CI/CD — Build & Deploy / Build (push) Has been cancelled
CI/CD — Build & Deploy / Deploy to VPS (push) Has been cancelled

This commit is contained in:
2026-03-14 08:12:08 +01:00
parent 5d4bab7d99
commit 87d076313c
5 changed files with 751 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ interface Video {
interface VideosResponse {
success: boolean;
data: Video[];
data: { videos: Video[] };
}
export default function HomePage() {
@@ -22,7 +22,7 @@ export default function HomePage() {
useEffect(() => {
apiFetch<VideosResponse>('/videos')
.then((res) => setVideos(res.data))
.then((res) => setVideos(res.data.videos))
.catch(() => setVideos([]))
.finally(() => setLoading(false));
}, []);