Skip to content

Commit 1e0f9d2

Browse files
author
rmen527
committed
Fix wrong text in L2 and center LevelComponent
1 parent 9a575fb commit 1e0f9d2

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/components/LevelComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const LEVEL_CONFIGS: Record<number, {
1616
task: `Translate this Python code into Alien code:\nx = 2\ny = x\ny += x`,
1717
},
1818
2: {
19-
pythonCode: `x = 5\ny = x - 3\nz = x ** 2\nprint(z)`,
19+
pythonCode: `x = 5\ny = x - 3\nz = y ** 2\nprint(z)`,
2020
alienCode: `x :) 1 + 1 + 1 + 1 + 1\ny :) x - 1 - 1 - 1\nz :) y ^ (1 + 1) \nz :(`,
2121
task: `Translate this Python code to Alien code:\nx = 2\ny = x ** (-2)\nprint(y)`,
2222
},

src/pages/home/Home.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@ export default function Home() {
4343
</div>
4444
</header>
4545
<section className="relative w-full h-screen">
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-
>
46+
<div
47+
className="absolute top-1/2 left-1/2 w-[90vw] z-50"
48+
style={{
49+
maxHeight: isVisible ? "100vh" : "0",
50+
overflow: "hidden",
51+
transition: "max-height 0.3s ease",
52+
transform: "translate(calc(-50% - 40px), -50%)",
53+
}}
54+
>
5455
<LevelComponent
5556
key={mountKey}
5657
onClose={() => handleClose()}

0 commit comments

Comments
 (0)