diff --git a/app/watch/page.tsx b/app/watch/page.tsx index ca98e37..35bebd1 100644 --- a/app/watch/page.tsx +++ b/app/watch/page.tsx @@ -12,10 +12,13 @@ export default function GamePage() { } return ( -
- {results.map((result) => ( - - ))} +
+

Recent Games

+
+ {results.map((result) => ( + + ))} +
); } diff --git a/app/watch/result.tsx b/app/watch/result.tsx index df6d6ca..b7d542c 100644 --- a/app/watch/result.tsx +++ b/app/watch/result.tsx @@ -3,13 +3,18 @@ import { ResultStatus } from "../result-status"; import { type ResultWithGame } from "@/convex/results"; import { Visualizer } from "../visualizer"; +import { format } from "date-fns"; export default function Result({ result }: { result: ResultWithGame }) { return ( -
+
{result.game !== null && ( -
- +
+
+ +

at {format(new Date(result._creationTime), "h:mma")}

+
+

Level {result.level}

{result.game.modelId}

)} diff --git a/package.json b/package.json index b257df4..68ac54b 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "convex": "^1.16.0", + "date-fns": "^4.1.0", "lucide-react": "^0.453.0", "next": "14.2.5", "next-themes": "^0.3.0",