diff --git a/src/components/userHub/AddArtButton.js b/src/components/userHub/AddArtButton.js index 311dff4..7622f4a 100644 --- a/src/components/userHub/AddArtButton.js +++ b/src/components/userHub/AddArtButton.js @@ -1,11 +1,21 @@ import React from "react"; import styles from "./AddArtButton.module.css"; import { Box } from "@mui/material"; +import { useAuth0 } from "@auth0/auth0-react"; +import { useNavigate } from 'react-router-dom'; const AddArtButton = () => { + const { isAuthenticated } = useAuth0(); + const { loginWithRedirect } = useAuth0(); + const navigate = useNavigate(); + + const handleCheckLogIn = () => { + isAuthenticated ? navigate("/VideoUpload") : loginWithRedirect(); + } + return ( - - + + diff --git a/src/components/userHub/UserVideo.js b/src/components/userHub/UserVideo.js index 09d9f40..2a49f23 100644 --- a/src/components/userHub/UserVideo.js +++ b/src/components/userHub/UserVideo.js @@ -7,7 +7,6 @@ import VideoBoxWithDecor from "./VideoBoxWithDecor"; const UserVideo = ({ video, maxWidth, withVideoInfo }) => { const { videoUrl, videoImg, ...videoInfo } = video; - console.log(videoInfo) return ( diff --git a/src/index.js b/src/index.js index 8223df3..d3f4293 100644 --- a/src/index.js +++ b/src/index.js @@ -9,11 +9,10 @@ import Home from "./pages/HomePage"; import Error from "./pages/ErrorPage"; import Multimedia from "./pages/MultimediaPage"; import Profile from "./pages/ProfilePage"; -import DummyHomePage from "./pages/DummyHomePage"; - +import DummyHomePage from "./pages/DummyHomePage" +import VideoUploadPage from "./pages/VideoUpload/VideoUpload"; import Theme from "./theme"; import App from "./App"; - import PostAuthentication from "./components/PostAuthentication"; import reportWebVitals from "./reportWebVitals"; import Episode from "./pages/EpisodePage"; @@ -60,7 +59,9 @@ root.render( /> } /> }> - }> + }> + }> + } /> } /> diff --git a/src/pages/DummyHomePage/PageTitleComponent.js b/src/pages/DummyHomePage/PageTitleComponent.js index 012be7d..5c240ce 100644 --- a/src/pages/DummyHomePage/PageTitleComponent.js +++ b/src/pages/DummyHomePage/PageTitleComponent.js @@ -1,6 +1,5 @@ import { Grid, Typography } from "@mui/material"; -import AddArtButton from "../../components/userHub/AddArtButton"; const PageTitleComponent = ({ title, fontSize }) => { const { mainTitle, subtitle } = title; @@ -43,7 +42,7 @@ const PageTitleComponent = ({ title, fontSize }) => { {subtitle} - + ); }; diff --git a/src/pages/DummyHomePage/index.js b/src/pages/DummyHomePage/index.js index bd459e0..0dd237e 100644 --- a/src/pages/DummyHomePage/index.js +++ b/src/pages/DummyHomePage/index.js @@ -1,64 +1,49 @@ -import { Grid } from "@mui/material"; -import UserVideo from "../../components/userHub/UserVideo"; -import { userHubVideoListMocks } from "../../api/mocks"; -import PageTitleComponent from "./PageTitleComponent"; + +import { Grid } from "@mui/material" +import UserVideo from "../../components/userHub/UserVideo" +import { userHubVideoListMocks } from "../../api/mocks" +import PageTitleComponent from "./PageTitleComponent" +import AddArtButton from "../../components/userHub/AddArtButton"; + + const DummyHomePage = () => { - let title = { - mainTitle: "Welcome to VideoHub", - subtitle: "Your Ultimate Destination for Awesome Content Experiences!", - }; - let fontSize = { - titleFontSize: "50pt", - subtitleFontSize: "24pt", - }; - return ( - - - - - - - {userHubVideoListMocks.map((video) => { - let withVideoInfo = true; - let maxWidth = "800px"; - return ( - - - - ); - })} - - - - ); -}; + let title = + { + mainTitle: "Welcome to VideoHub", + subtitle: "Your Ultimate Destination for Awesome Content Experiences!" + } + let fontSize = + { + titleFontSize: "50pt", + subtitleFontSize: "24pt" + } + + return ( + + + + + + + + + + + {userHubVideoListMocks.map((video) => { + let withVideoInfo = true; + let maxWidth = "800px"; + return ( + + + + ) + })} + + + + + ) +} -export default DummyHomePage; +export default DummyHomePage