mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 03:29:51 +02:00
feat: data passing
This commit is contained in:
1 parent
2286a398cf
commit
423ffdb24f
4 files changed
+20
-26
No files matched your search
@@ -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} />
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user