feat: data passing

This commit is contained in:
TrèsAbhi committed 2024-07-10 12:55:19 -05:00
1 parent 2286a398cf
commit 423ffdb24f
4 files changed
+20 -26

No files matched your search

+6 -8
View File
@@ -5,15 +5,13 @@ import { tankIcon } from '../../../../core/blitzkit/tankIcon';
import strings from '../../../../lang/en-US.json';
import * as Duel from '../../../../stores/duel';
interface TankopediaLayoutProps {
children: ReactNode;
params: { id: string };
}
export default async function TankopediaLayout({
export default async function Layout({
children,
params,
}: TankopediaLayoutProps) {
}: {
children: ReactNode;
params: { id: string };
}) {
const id = Number(params.id);
const awaitedTankDefinitions = await tankDefinitions;
const tank = awaitedTankDefinitions[id];
@@ -23,7 +21,7 @@ export default async function TankopediaLayout({
const description = `Statistics, armor profiles, and equipment for ${tank.name}`;
return (
<Duel.Provider>
<Duel.Provider data={id}>
<title>{title}</title>
<meta name="description" content={description} />
<meta property="og:title" content={title} />
+1 -2
View File
@@ -13,8 +13,7 @@ import { TechTreeSection } from './components/Model/TechTreeSection';
import { ShotDisplaySection } from './components/ShotDisplaySection';
import { VideoSection } from './components/VideoSection';
// TODO: remove this param if not needed for duel assignment
export default function Page({ params }: { params: { id: string } }) {
export default function Page() {
const exempt = useAdExempt();
const mutateTankopediaEphemeral = TankopediaEphemeral.useMutation();
const mutateDuel = Duel.useMutation();