Skip to content

Commit

Permalink
dynamic import
Browse files Browse the repository at this point in the history
  • Loading branch information
BrightTheBackpack committed Nov 29, 2024
1 parent 299cf36 commit 719fbc7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { keyframes } from '@emotion/react'
// import '@google/model-viewer';
// import Script from 'next/script';

import { useEffect } from 'react';

// import Image from "next/image";
import {
Expand All @@ -30,7 +30,11 @@ const fall = ( rotationDirection: number) => keyframes`
}
`;
export default function Home() {

useEffect(() => {
if (typeof window !== 'undefined') {
import('@google/model-viewer');
}
}, []);
return (
<Grid gap = {0} sx={{
backgroundImage: 'linear-gradient(to bottom, #25A8FF, #DCF1FF)',
Expand Down Expand Up @@ -115,8 +119,8 @@ export default function Home() {
// height: '65vh'
}}
>
{ typeof window !=='undefined' && <ModelViewer/>}
{/*
{typeof window !== 'undefined' && <ModelViewer />}
{/*
<Image
src="https://cloud-1mi3pnd3v-hack-club-bot.vercel.app/0image.png"
alt="Example PCB!"
Expand Down

0 comments on commit 719fbc7

Please sign in to comment.