diff --git a/pages/index.tsx b/pages/index.tsx index 3500fdbc..f8383296 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -8,30 +8,20 @@ import { useInView } from 'react-intersection-observer'; import Link from 'next/link'; import { useIsMobile } from '@/hooks'; -const PenroseTriangleScene = dynamic( - () => - useIsMobile() ? Promise.resolve(() => null) : import('@/components/3js/pennRoseTriangleScene'), - { - ssr: false, - loading: () => null, - } -); +const PenroseTriangleScene = dynamic(() => import('@/components/3js/pennRoseTriangleScene'), { + ssr: false, + loading: () => null, +}); -const AnimatedAsterisk = dynamic( - () => (useIsMobile() ? Promise.resolve(() => null) : import('@/components/3js/animatedAsterisk')), - { - ssr: false, - loading: () => null, - } -); +const AnimatedAsterisk = dynamic(() => import('@/components/3js/animatedAsterisk'), { + ssr: false, + loading: () => null, +}); -const AnimatedShape = dynamic( - () => (useIsMobile() ? Promise.resolve(() => null) : import('@/components/3js/animatedMesh')), - { - ssr: false, - loading: () => null, - } -); +const AnimatedShape = dynamic(() => import('@/components/3js/animatedMesh'), { + ssr: false, + loading: () => null, +}); const FadeInSection = ({ children, @@ -135,11 +125,7 @@ export default function Home() { */}
- {isMobile ? ( -
- ) : ( - - )} + {!isMobile && }
@@ -162,7 +148,7 @@ export default function Home() { {/* First Box */}
- {isMobile ?
: } + {!isMobile && }
@@ -186,7 +172,7 @@ export default function Home() { {/* Second Box */}
- {isMobile ?
: } + {!isMobile && }
@@ -210,7 +196,7 @@ export default function Home() { {/* Third Box */}
- {isMobile ?
: } + {!isMobile && }