diff --git a/src/app/(routes)/layout.tsx b/src/app/(routes)/layout.tsx index ec85cd1..79ebb03 100644 --- a/src/app/(routes)/layout.tsx +++ b/src/app/(routes)/layout.tsx @@ -1,39 +1,10 @@ import React from "react"; -import { Trophy, Brain, Star } from "lucide-react"; import Navbar from "@/components/navbar"; function Layout({ children }: { children: React.ReactNode }) { return (
- {/* Animated background elements */} - {/*
- {[...Array(20)].map((_, i) => ( -
- ))} -
- -
- -
-
- -
-
- -
*/} - {/* Main content */} {children}
); diff --git a/src/app/(routes)/me/page.tsx b/src/app/(routes)/me/page.tsx deleted file mode 100644 index ef32834..0000000 --- a/src/app/(routes)/me/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import React from "react"; - -function MePage() { - return
MePage
; -} - -export default MePage; diff --git a/src/app/(routes)/page.tsx b/src/app/(routes)/page.tsx index 48d8d70..529489e 100644 --- a/src/app/(routes)/page.tsx +++ b/src/app/(routes)/page.tsx @@ -29,7 +29,7 @@ export default async function QuizGameStartPage() { +
+ + + {/* Main content */} +
+
+ {/* Profile Card */} +
+
+
+
+
+ Profile +
+
+
+ {user.level} +
+
+ +

{user.username}

+

Member since {user.joinDate}

+ + {/* XP Progress */} +
+
+ XP: {user.xp.toLocaleString()} + {user.xpToNextLevel.toLocaleString()} +
+
+
+
+
+ {Math.floor(user.xpToNextLevel - user.xp).toLocaleString()} XP to level {user.level + 1} +
+
+ + {/* Stats */} +
+
+

{user.gamesPlayed}

+

Games

+
+
+

{user.gamesWon}

+

Wins

+
+
+

{user.winRate}%

+

Win Rate

+
+
+ + +
+
+ + {/* Achievements and Recent Games */} +
+ {/* Achievements */} +
+
+ +

Achievements

+
+ +
+ {user.badges.map((badge, index) => ( +
+
+ +
+
+

{badge.name}

+
+
+ ))} + +
+
+ +
+
+

Locked Achievement

+
+
+
+
+ + {/* Stats Overview */} +
+
+ +

Stats Overview

+
+ +
+
+

Top Categories

+
+
+
+ Science + 92% +
+
+
+
+
+
+
+ History + 78% +
+
+
+
+
+
+
+ Movies + 65% +
+
+
+
+
+
+
+ +
+

Response Time

+
+
+

3.2s

+

Average response time

+

Faster than 75% of players

+
+
+
+
+
+ + {/* Recent Games */} +
+
+ +

Recent Games

+
+ +
+ {user.recentGames.map((game) => ( +
+
+ {game.position === "1st" ? ( + + ) : game.position === "2nd" ? ( + + ) : ( + + )} +
+
+
+

{game.topic}

+ {game.date} +
+
+ + Position: {game.position} + + + Score: {game.score} + +
+
+
+ ))} + + +
+
+
+
+
+ + {/* Footer */} + + + ) +} + diff --git a/src/components/navbar-links.tsx b/src/components/navbar-links.tsx new file mode 100644 index 0000000..0ab6e1f --- /dev/null +++ b/src/components/navbar-links.tsx @@ -0,0 +1,28 @@ +"use client"; + +import React from 'react' +import { Button } from './ui/button' +import Link from 'next/link' +import { Home } from 'lucide-react' +import { usePathname } from 'next/navigation'; + +function NavbarLinks() { + const pathname = usePathname() + return ( + <> + + + + ) +} + +export default NavbarLinks \ No newline at end of file diff --git a/src/components/navbar.tsx b/src/components/navbar.tsx index 5215e97..3029937 100644 --- a/src/components/navbar.tsx +++ b/src/components/navbar.tsx @@ -4,36 +4,25 @@ import Avatar from "./avatar"; import { Button } from "./ui/button"; import Link from "next/link"; import { Home } from "lucide-react"; +import NavbarLinks from "./navbar-links"; async function Navbar() { const session = await auth(); + return ( ); diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 2725644..3e07f04 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -11,6 +11,8 @@ const buttonVariants = cva( variant: { default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90", + rounded: + "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90 rounded-full", destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", outline: @@ -18,7 +20,7 @@ const buttonVariants = cva( secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80", ghost: - "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50", + "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 rounded-full", link: "text-primary underline-offset-4 hover:underline", party: "bg-primary text-primary-foreground rounded-xl border-b-4 shadow-lg text-lg font-bold hover:translate-y-1 hover:border-b-2 ",