feat(characters): use local character catalog
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
import { getCharacterBySlug } from "@/data/constants/character";
|
||||
import { PrivateRoomRouteProvider } from "@/providers/private-room-route-provider";
|
||||
|
||||
export default async function CharacterPrivateRoomLayout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
params: Promise<{ characterSlug: string }>;
|
||||
}) {
|
||||
const { characterSlug } = await params;
|
||||
const character = getCharacterBySlug(characterSlug);
|
||||
if (!character) notFound();
|
||||
|
||||
return (
|
||||
<PrivateRoomRouteProvider characterId={character.id}>
|
||||
{children}
|
||||
</PrivateRoomRouteProvider>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { PrivateRoomScreen } from "@/app/private-room/private-room-screen";
|
||||
|
||||
export default function CharacterPrivateRoomPage() {
|
||||
return <PrivateRoomScreen />;
|
||||
}
|
||||
Reference in New Issue
Block a user