From 0fa9dcf980f6f960a4c07a151791f26450e1c18e Mon Sep 17 00:00:00 2001 From: Bhoopesh Date: Fri, 8 Dec 2023 21:44:41 +0530 Subject: [PATCH] fix: minor fix --- src/app/gallery/page.tsx | 3 +- src/app/globals.css | 2 +- src/app/home/page.tsx | 2 +- src/app/page.tsx | 73 +++++++------------- src/components/Landing/LoadingMobileView.tsx | 2 +- src/components/Landing/LoadingWebView.tsx | 2 +- 6 files changed, 31 insertions(+), 53 deletions(-) diff --git a/src/app/gallery/page.tsx b/src/app/gallery/page.tsx index 489b44f..bbd320a 100644 --- a/src/app/gallery/page.tsx +++ b/src/app/gallery/page.tsx @@ -77,7 +77,8 @@ const History = () => { styles.historyBG + ' ' + 'h-screen w-screen p-0 flex justify-center items-center overflow-y-hidden' + - (isScrolled ? 'scrolled' : '') + ' ' + + (isScrolled ? ' scrolled' : ' transitioned') } onWheel={simulateScroll} onTouchStart={handleTouchStart} diff --git a/src/app/globals.css b/src/app/globals.css index dae322e..593a54c 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -104,7 +104,7 @@ body { background-color: initial; } to { - background-color: #7efbfe; + background-color: #000; } } diff --git a/src/app/home/page.tsx b/src/app/home/page.tsx index 3b7bb6f..d31c13a 100644 --- a/src/app/home/page.tsx +++ b/src/app/home/page.tsx @@ -57,7 +57,7 @@ export default function Home() { } >
{ return result; }; -function useWindowSize() { - const [windowSize, setWindowSize] = useState<{ - width: number | undefined; - height: number | undefined; - }>({ - width: undefined, - height: undefined, - }); - - useEffect(() => { - function handleResize() { - setWindowSize({ - width: window.innerWidth, - height: window.innerHeight, - }); - } - window.addEventListener('resize', handleResize); - handleResize(); - return () => window.removeEventListener('resize', handleResize); - }, []); - return windowSize; -} - export default function Loading() { - const size = useWindowSize(); const currDate = new Date(); const [animationStarted, setAnimationStarted] = useState(false); const [year, setYear] = useState(String(currDate.getFullYear()).padStart(4, '0')); @@ -87,8 +63,8 @@ export default function Loading() { clearInterval(lightTimer); setTimeout(() => { router.push('/home'); - }, 1000); - }, 5000); + }, 500); + }, 2000); const lightTimer = setInterval(() => { setIsLeftLightOn(prev => !prev); }, 100); @@ -100,27 +76,28 @@ export default function Loading() { } }, [animationStarted, router]); - return size.width !== undefined && size.width < 700 ? ( - - ) : ( - + return ( + <> + + + ); } diff --git a/src/components/Landing/LoadingMobileView.tsx b/src/components/Landing/LoadingMobileView.tsx index 815044e..37cf0d9 100644 --- a/src/components/Landing/LoadingMobileView.tsx +++ b/src/components/Landing/LoadingMobileView.tsx @@ -15,7 +15,7 @@ const LoadingMobileView = ({ }: LoadingProps) => { return ( <> -
+
light diff --git a/src/components/Landing/LoadingWebView.tsx b/src/components/Landing/LoadingWebView.tsx index fde2f78..16f840e 100644 --- a/src/components/Landing/LoadingWebView.tsx +++ b/src/components/Landing/LoadingWebView.tsx @@ -15,7 +15,7 @@ const LoadingWebView = ({ }: LoadingProps) => { return ( <> -
+