diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index a354950..837ff54 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -1,3 +1,4 @@ +import Card from "@/components/Card"; import Container from "@/components/Container"; import { headers } from "next/headers"; @@ -6,14 +7,12 @@ export default async function NotFound() { const domain = headersList.get("host"); return ( -
-
-

404 Not Found

-

- The page you requested does not exist. -

-
-
+ +

404 Not Found

+

+ The page you requested does not exist. +

+
); } diff --git a/src/app/player/[id]/page.tsx b/src/app/player/[id]/page.tsx index 75e48a9..bbb0395 100644 --- a/src/app/player/[id]/page.tsx +++ b/src/app/player/[id]/page.tsx @@ -1,6 +1,7 @@ "use client"; import Avatar from "@/components/Avatar"; +import Card from "@/components/Card"; import Container from "@/components/Container"; import Label from "@/components/Label"; import Pagination from "@/components/Pagination"; @@ -96,7 +97,7 @@ export default function Player({ params }: { params: { id: string } }) { return (
-
+
{player.loading && } @@ -115,7 +116,7 @@ export default function Player({ params }: { params: { id: string } }) { )}
-
+
); @@ -127,7 +128,7 @@ export default function Player({ params }: { params: { id: string } }) {
{/* Player Info */} -
+
@@ -185,11 +186,11 @@ export default function Player({ params }: { params: { id: string } }) {
-
+ {/* Scores */} -
-
+ +
{scores.loading ? (
@@ -207,7 +208,7 @@ export default function Player({ params }: { params: { id: string } }) { className="grid grid-cols-[.95fr_6fr_3fr] pb-2 pt-2" key={id} > -
+

#{score.rank}

@@ -267,7 +268,7 @@ export default function Player({ params }: { params: { id: string } }) { />
-
+
); diff --git a/src/app/search/page.tsx b/src/app/search/page.tsx index 7576555..8e3d095 100644 --- a/src/app/search/page.tsx +++ b/src/app/search/page.tsx @@ -1,4 +1,5 @@ import Avatar from "@/components/Avatar"; +import Card from "@/components/Card"; import Container from "@/components/Container"; import SearchPlayer from "@/components/SearchPlayer"; @@ -12,7 +13,10 @@ export default function Home() { return (
-
+
-
+
); diff --git a/src/components/Card.tsx b/src/components/Card.tsx new file mode 100644 index 0000000..53593e5 --- /dev/null +++ b/src/components/Card.tsx @@ -0,0 +1,26 @@ +import clsx from "clsx"; + +type CardProps = { + className?: string; + innerClassName?: string; + children: React.ReactNode; +}; + +export default function Card({ + className, + innerClassName, + children, +}: CardProps) { + return ( +
+
+ {children} +
+
+ ); +}