From 741a6f605bed3c765ab05b0f36622fec18265345 Mon Sep 17 00:00:00 2001 From: EvanLin3141 Date: Wed, 5 Mar 2025 16:14:12 +0000 Subject: [PATCH] UPDATE: Vods go Horizontally --- frontend/src/pages/Vods.tsx | 87 ++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 49 deletions(-) diff --git a/frontend/src/pages/Vods.tsx b/frontend/src/pages/Vods.tsx index 662e4da..5387a4f 100644 --- a/frontend/src/pages/Vods.tsx +++ b/frontend/src/pages/Vods.tsx @@ -2,7 +2,6 @@ import React, { useEffect, useState } from "react"; import { useAuth } from "../context/AuthContext"; import { useNavigate, useParams } from "react-router-dom"; import DynamicPageContent from "../components/Layout/DynamicPageContent"; -import Footer from "../components/Layout/Footer"; interface Vod { vod_id: number; @@ -48,59 +47,49 @@ const Vods: React.FC = () => { return ( -
+
-
-

{username}'s VODs

-
- {ownedVods.length === 0 ? ( -

No VODs available.

- ) : ( - ownedVods.map((vod) => { - const thumbnailUrl = `/vods/${username}/${vod.vod_id}.png`; +

{username}'s VODs

+ + {/* Horizontal Scrollable VOD List */} +
+ {ownedVods.length === 0 ? ( +

No VODs available.

+ ) : ( + ownedVods.map((vod) => { + const thumbnailUrl = `/vods/${username}/${vod.vod_id}.png`; - return ( -
navigate(`/stream/${username}/vods/${vod.vod_id}`)} - > - {/* Thumbnail */} - {`Thumbnail { - e.currentTarget.onerror = null; - e.currentTarget.src = "/default-thumbnail.png"; - }} - /> - {/* Video Info */} -
- - {/* Video Title */} -

{vod.title}

- - {/* Channel Name */} -
-

{username}

-
- - {/* Views and Date */} -
-

{vod.views} views

-

{new Date(vod.datetime).toLocaleString()}

-
-
+ return ( +
navigate(`/stream/${username}/vods/${vod.vod_id}`)} + > + {/* Thumbnail */} + {`Thumbnail { + e.currentTarget.onerror = null; + e.currentTarget.src = "/default-thumbnail.png"; + }} + /> + {/* Video Info */} +
+

{vod.title}

+

{username}

+

{vod.views} views

+

{new Date(vod.datetime).toLocaleString()}

- ); - }) - )} -
+
+ ); + }) + )}