diff --git a/src/pages/components/loadingScene.jsx b/src/pages/components/loadingScene.jsx new file mode 100644 index 0000000..99bf780 --- /dev/null +++ b/src/pages/components/loadingScene.jsx @@ -0,0 +1,20 @@ +import { useState, useEffect } from 'react'; +import '../../css/global.css'; + +function LoadingScene() { + return ( +
+ Loading... +
+ ); +} + +export default LoadingScene \ No newline at end of file diff --git a/src/pages/components/playVideo.jsx b/src/pages/components/playVideo.jsx index 38f689e..b6422c9 100644 --- a/src/pages/components/playVideo.jsx +++ b/src/pages/components/playVideo.jsx @@ -1,9 +1,9 @@ -import '../../css/video.css' +import '../../css/video.css'; -function PlayVideo({ src="hallway_FFF.mp4" }) { +function PlayVideo({ src = "hallway_FFF.mp4", onVideoReady }) { const urlSource = `${import.meta.env.VITE_ASSETS_URL}/${src}`; - return( + return (
- ) + ); } - -export default PlayVideo + +export default PlayVideo; diff --git a/src/pages/introductionPage.jsx b/src/pages/introductionPage.jsx index 0b6e36b..bde77eb 100644 --- a/src/pages/introductionPage.jsx +++ b/src/pages/introductionPage.jsx @@ -3,9 +3,10 @@ import '../css/global.css' import BlackButton from './components/customButton' import Animation from './components/animation.jsx'; import PlayVideo from './components/playVideo.jsx'; +import LoadingScene from './components/loadingScene.jsx'; -function IntroductionPage() { - return( +function IntroductionPageData(){ + return(
- {/*
- -
-
- -
-
- -
-
- -
-
- -
-
- -
*/} - + {/* */}
{ + setLoading(false); // Set loading to false when the video is ready + }; + + return ( +
+ {loading ? ( + + ) : ( + + )} + +
+ ); +} + + + export default IntroductionPage