Commit 2257ffdd by Arjun Jhukal

reverted the static site generation for the exclusive game

parent 0a54e96f
import ExclusiveGameDetail from "@/components/pages/dashboard/userDashboard/games/exclusiveGames/exclusiveGameDetail"; import ExclusiveGameDetail from "@/components/pages/dashboard/userDashboard/games/exclusiveGames/exclusiveGameDetail";
import { getAllGames, getSingleGame } from "@/serverApi/game"; import { getSingleGame } from "@/serverApi/game";
import { Metadata } from "next"; import { Metadata } from "next";
const SITE_URL = process.env.NEXT_PUBLIC_FRONTEND_URL!; const SITE_URL = process.env.NEXT_PUBLIC_FRONTEND_URL!;
...@@ -28,18 +28,6 @@ export async function generateMetadata(props: { params: Promise<{ id: string }> ...@@ -28,18 +28,6 @@ export async function generateMetadata(props: { params: Promise<{ id: string }>
}; };
} }
export async function generateStaticParams() {
const res = await getAllGames()
const games = res?.data?.data ?? []
return games.map((game: any) => ({
id: String(game.id),
}))
}
export const dynamic = 'force-static';
export default async function UserGameDetail(props: { params: Promise<{ id: string }> }) { export default async function UserGameDetail(props: { params: Promise<{ id: string }> }) {
const { id } = await props.params; const { id } = await props.params;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment