Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgr committed Oct 8, 2024
1 parent 60cf1c5 commit e23cfb6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion fresh.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export default defineConfig({
plugins: [
...plugins({
manifest: decoManifest,
// deno-lint-ignore no-explicit-any
}),
],
});
4 changes: 2 additions & 2 deletions sections/Galcbros.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function MarioBrosGame({
}
};

window.addEventListener("keydown", handleKeyDown);
globalThis.window.addEventListener("keydown", handleKeyDown);

const gameLoop = () => {
ctx.clearRect(0, 0, canvas.width, canvas.height);
Expand Down Expand Up @@ -123,7 +123,7 @@ export default function MarioBrosGame({
gameLoop();

return () => {
window.removeEventListener("keydown", handleKeyDown);
globalThis.window.removeEventListener("keydown", handleKeyDown);
};
}, [backgroundColor, characterColor, obstacleColor, groundColor]);

Expand Down
4 changes: 2 additions & 2 deletions sections/SpaceInvaders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ export default function SpaceInvaders({
}
};

window.addEventListener("keydown", handleKeyDown);
globalThis.window.addEventListener("keydown", handleKeyDown);

return () => {
if (gameLoop) clearInterval(gameLoop);
window.removeEventListener("keydown", handleKeyDown);
globalThis.window.removeEventListener("keydown", handleKeyDown);
};
}, [
spaceship,
Expand Down

0 comments on commit e23cfb6

Please sign in to comment.