From 414e8a5cd8124e1f1aa64b2abb27f501bd620014 Mon Sep 17 00:00:00 2001 From: Giuseppe Milicia Date: Sat, 17 Dec 2022 11:41:40 +0100 Subject: [PATCH] feat: add archive page --- src/App.js | 7 +++++++ src/components/TopBar.js | 12 ++++++++++++ src/components/VideoThumbnail.js | 21 +++++++++++++++++++++ src/pages/VideoArchive.js | 20 ++++++++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 src/components/TopBar.js create mode 100644 src/components/VideoThumbnail.js create mode 100644 src/pages/VideoArchive.js diff --git a/src/App.js b/src/App.js index 54cbf34..204d1f1 100644 --- a/src/App.js +++ b/src/App.js @@ -6,6 +6,8 @@ import {Outlet, Route, Routes} from "react-router-dom"; import Error404 from "./pages/Error404"; import Login from "./pages/Login"; import Signup from "./pages/Signup"; +import PrivateRoute from "./utils/PrivateRoute"; +import VideoArchive from "./pages/VideoArchive"; function App() { return ( @@ -13,6 +15,11 @@ function App() { }> } /> } /> + + + + } /> } /> diff --git a/src/components/TopBar.js b/src/components/TopBar.js new file mode 100644 index 0000000..5cffda2 --- /dev/null +++ b/src/components/TopBar.js @@ -0,0 +1,12 @@ +function TopBar(props) { + return ( +
+
+

{props.title}

+ {props.actionBtn} +
+
+ ); +} + +export default TopBar; diff --git a/src/components/VideoThumbnail.js b/src/components/VideoThumbnail.js new file mode 100644 index 0000000..ed943e6 --- /dev/null +++ b/src/components/VideoThumbnail.js @@ -0,0 +1,21 @@ +import more from "../assets/more.svg"; +import {NavLink} from "react-router-dom"; + +function VideoPreview(props) { + return ( + +
+ {props.title} + More +
+
{props.title}
+
+ {props.tags.map(tag => {tag})} +
+
+
+
+ ); +} + +export default VideoPreview; diff --git a/src/pages/VideoArchive.js b/src/pages/VideoArchive.js new file mode 100644 index 0000000..24fa095 --- /dev/null +++ b/src/pages/VideoArchive.js @@ -0,0 +1,20 @@ +import archive1 from "../assets/archive-1.png"; +import TopBar from "../components/TopBar"; +import VideoThumbnail from "../components/VideoThumbnail"; +import {NavLink} from "react-router-dom"; + +function VideoArchive() { + return ( +
+ Create New} + /> +
+ +
+
+ ); +} + +export default VideoArchive;