diff --git a/app/games/[id]/page.js b/app/games/[id]/page.js index 227dbcd..ee13dfd 100644 --- a/app/games/[id]/page.js +++ b/app/games/[id]/page.js @@ -6,6 +6,13 @@ import { useState } from "react"; import { HeartFilledIcon, HeartIcon } from "@radix-ui/react-icons"; import TournamentSection from "../../../components/TournamentSection"; import { ListFilter } from "lucide-react"; +import { Button } from "../../../@/components/ui/button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "../../../components/ui/dropdown-menu"; export default function GamePage({ params }) { const [isFavourite, setIsFavourite] = useState(false); @@ -18,6 +25,25 @@ export default function GamePage({ params }) { setIsFavourite(!isFavourite); }; + const [filters, setFilters] = useState({ + entryFee: "", + mode: "", + status: "", + }); + + const handleFilterChange = (e) => { + const { name, value } = e.target; + setFilters((prev) => ({ ...prev, [name]: value })); + }; + + const clearFilters = () => { + setFilters({ + entryFee: "", + mode: "", + status: "", + }); + }; + return (
{/* Banner */} @@ -34,21 +60,21 @@ export default function GamePage({ params }) { {/* Title */}
-
+

{game.name}

- +
{/* Desc */} @@ -60,16 +86,77 @@ export default function GamePage({ params }) { {/* Tournaments */}
{/* title */} -
+

Tournaments

- - {/* Filter dropdown logic */} + + + + + + +
+ + +
+
+ + +
+
+ + +
+ + + + +
+
diff --git a/app/layout.js b/app/layout.js index 5273c16..7663713 100644 --- a/app/layout.js +++ b/app/layout.js @@ -4,6 +4,7 @@ import { ThemeProvider } from "../components/theme-provider"; import Navbar from "../components/Navbar"; import Footer from "../components/Footer"; import AuthProvider from "../context/AuthProvider"; +import NextTopLoader from "nextjs-toploader"; const inter = Inter({ subsets: ["latin"] }); @@ -23,6 +24,7 @@ export default function RootLayout({ children }) { enableSystem disableTransitionOnChange > +
{children}
diff --git a/components/FeatureSection/FeatureSectionGrid.jsx b/components/FeatureSection/FeatureSectionGrid.jsx index 0d53333..5618990 100644 --- a/components/FeatureSection/FeatureSectionGrid.jsx +++ b/components/FeatureSection/FeatureSectionGrid.jsx @@ -112,6 +112,7 @@ export const SkeletonOne = () => { width={1000} height={1000} className="full rounded-sm" + draggable="false" />
@@ -149,6 +150,7 @@ export const SkeletonThree = () => { width={800} height={800} className="mt-2 object-cover object-center rounded-sm blur-none group-hover/image:blur-md transition-all duration-200" + draggable="false" />
@@ -202,10 +204,11 @@ export const SkeletonTwo = () => { > bali images ))} @@ -224,10 +227,11 @@ export const SkeletonTwo = () => { > bali images ))} diff --git a/components/HeroSection.jsx b/components/HeroSection.jsx index e667b0f..7fa4d80 100644 --- a/components/HeroSection.jsx +++ b/components/HeroSection.jsx @@ -51,6 +51,7 @@ export default function HeroSection() { width={1200} className="mx-auto shadow-lg rounded-2xl" alt="" + draggable={false} />
diff --git a/components/Navbar.jsx b/components/Navbar.jsx index 2783f4f..5bdd10b 100644 --- a/components/Navbar.jsx +++ b/components/Navbar.jsx @@ -69,7 +69,7 @@ const Navbar = () => { {/* buttons */}
- diff --git a/package-lock.json b/package-lock.json index 2807e5e..ede353e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,7 @@ "next-auth": "^4.24.7", "next-sanity": "^9.4.2", "next-themes": "^0.3.0", + "nextjs-toploader": "^1.6.12", "prisma": "^5.16.1", "react": "^18", "react-dom": "^18", @@ -11633,6 +11634,24 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/nextjs-toploader": { + "version": "1.6.12", + "resolved": "https://registry.npmjs.org/nextjs-toploader/-/nextjs-toploader-1.6.12.tgz", + "integrity": "sha512-nbun5lvVjlKnxLQlahzZ55nELVEduqoEXT03KCHnsEYJnFpI/3BaIzpMyq/v8C7UGU2NfxQmjq6ldZ310rsDqA==", + "license": "MIT", + "dependencies": { + "nprogress": "^0.2.0", + "prop-types": "^15.8.1" + }, + "funding": { + "url": "https://github.com/sponsors/TheSGJ" + }, + "peerDependencies": { + "next": ">= 6.0.0", + "react": ">= 16.0.0", + "react-dom": ">= 16.0.0" + } + }, "node_modules/node-addon-api": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", @@ -11759,6 +11778,12 @@ "set-blocking": "^2.0.0" } }, + "node_modules/nprogress": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", + "integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==", + "license": "MIT" + }, "node_modules/nth-check": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", diff --git a/package.json b/package.json index d33febc..75191aa 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "next-auth": "^4.24.7", "next-sanity": "^9.4.2", "next-themes": "^0.3.0", + "nextjs-toploader": "^1.6.12", "prisma": "^5.16.1", "react": "^18", "react-dom": "^18",