File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ export default function Home() {
1616 setIsVisible ( true ) ;
1717 } ;
1818
19+ const handleClose = ( ) => {
20+ setIsVisible ( false ) ;
21+ zoomOutRef . current ?.( ) ;
22+ } ;
23+
1924 useEffect ( ( ) => {
2025 if ( ! canvasRef . current ) return ;
2126 const { zoomOut } = main ( canvasRef . current , handleOpen ) ;
@@ -24,19 +29,13 @@ export default function Home() {
2429
2530 return (
2631 < div >
27- < header >
28- < div className = { styles [ "header-brand" ] } >
29- < h1 > glorpython</ h1 >
30- </ div >
31- </ header >
32-
3332 < section className = "relative w-full h-screen" >
3433 { isVisible && (
3534
3635 < div className = "absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[90vw] h-[90vh] z-50" >
3736 < LevelComponent
3837 key = { mountKey }
39- onClose = { ( ) => setIsVisible ( false ) }
38+ onClose = { ( ) => handleClose ( ) }
4039 lvl = { lvlNum }
4140 />
4241 </ div >
You can’t perform that action at this time.
0 commit comments