Skip to content

Commit 5b2852c

Browse files
committed
2 parents 5d12657 + 91511dc commit 5b2852c

2 files changed

Lines changed: 30 additions & 24 deletions

File tree

src/pages/home/.ipynb_checkpoints/Home-checkpoint.tsx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,24 @@ export default function Home() {
3939
}}
4040
>
4141
<div className={styles["header-brand"]}>
42-
<h1>glorpython</h1>
42+
<img src="/logo.png" alt="" />
4343
</div>
4444
</header>
4545
<section className="relative w-full h-screen">
46-
{isVisible && (
47-
48-
<div className="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[90vw] h-[90vh] z-50">
49-
<LevelComponent
50-
key={mountKey}
51-
onClose={() => handleClose()}
52-
lvl={getLevelRef.current ? getLevelRef.current() : 0}
53-
/>
54-
</div>
55-
56-
)}
46+
<div
47+
className="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[90vw] z-50"
48+
style={{
49+
maxHeight: isVisible ? "100vh" : "0",
50+
overflow: "hidden",
51+
transition: "max-height 0.3s ease",
52+
}}
53+
>
54+
<LevelComponent
55+
key={mountKey}
56+
onClose={() => handleClose()}
57+
lvl={getLevelRef.current ? getLevelRef.current() : 0}
58+
/>
59+
</div>
5760
<canvas ref={canvasRef} className={styles.solarsystem}></canvas>
5861
</section>
5962
</div>

src/pages/home/Home.tsx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,24 @@ export default function Home() {
3939
}}
4040
>
4141
<div className={styles["header-brand"]}>
42-
<h1>glorpython</h1>
42+
<img src="/logo.png" alt="" />
4343
</div>
4444
</header>
4545
<section className="relative w-full h-screen">
46-
{isVisible && (
47-
48-
<div className="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[90vw] h-[90vh] z-50">
49-
<LevelComponent
50-
key={mountKey}
51-
onClose={() => handleClose()}
52-
lvl={getLevelRef.current ? getLevelRef.current() : 0}
53-
/>
54-
</div>
55-
56-
)}
46+
<div
47+
className="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[90vw] z-50"
48+
style={{
49+
maxHeight: isVisible ? "100vh" : "0",
50+
overflow: "hidden",
51+
transition: "max-height 0.3s ease",
52+
}}
53+
>
54+
<LevelComponent
55+
key={mountKey}
56+
onClose={() => handleClose()}
57+
lvl={getLevelRef.current ? getLevelRef.current() : 0}
58+
/>
59+
</div>
5760
<canvas ref={canvasRef} className={styles.solarsystem}></canvas>
5861
</section>
5962
</div>

0 commit comments

Comments
 (0)