add wrapper component to check auth
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import GameWrapper from "@/components/game/GameWrapper";
|
||||
import GameAuthWrapper from "@/components/game/GameAuthWrapper";
|
||||
import { getGame } from "@/lib/game";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
export default async function GamePage({ params }: { params: { code: string } }) {
|
||||
export default async function Game({ params }: { params: { code: string } }) {
|
||||
const game = await getGame(params.code);
|
||||
if (!game) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
return <GameWrapper initialLobby={game} />;
|
||||
return <GameAuthWrapper initialLobby={game} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user