Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test-app/app/spaceInvaders/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"use client";

import { useEffect, useRef, useState } from 'react';
import Head from 'next/head';

export default function SpaceInvaders() {
const canvasRef = useRef(null);
Expand Down Expand Up @@ -98,6 +100,9 @@ export default function SpaceInvaders() {

return (
<div className="flex flex-col items-center p-4">
<Head>
<title>Space Invaders</title>
</Head>
<h1 className="text-2xl font-bold text-white mb-4">Space Invaders</h1>
<canvas ref={canvasRef} width={canvasWidth} height={canvasHeight} className="bg-black rounded" />
</div>
Expand Down
Loading