We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 067b8fa + c8f3542 commit e9e6e80Copy full SHA for e9e6e80
1 file changed
src/pages/home/Home.tsx
@@ -16,6 +16,11 @@ export default function Home() {
16
setIsVisible(true);
17
};
18
19
+ const handleClose = () => {
20
+ setIsVisible(false);
21
+ zoomOutRef.current?.();
22
+ };
23
+
24
useEffect(() => {
25
if (!canvasRef.current) return;
26
const { zoomOut } = main(canvasRef.current, handleOpen);
@@ -24,14 +29,13 @@ export default function Home() {
29
30
return (
31
<div>
27
-
28
32
<section className="relative w-full h-screen">
33
{isVisible && (
34
35
<div className="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[90vw] h-[90vh] z-50">
36
<LevelComponent
37
key={mountKey}
- onClose={() => setIsVisible(false)}
38
+ onClose={() => handleClose()}
39
lvl={lvlNum}
40
/>
41
</div>
0 commit comments