mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: preview image
This commit is contained in:
1 parent
9256244286
commit
7a64fb8176
2 files changed
+30
-2
No files matched your search
@@ -13,8 +13,6 @@ export function Title() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<title>{protagonist.tank.name}</title>
|
||||
|
||||
<Flex gap="6" justify="center" align="center" style={{ padding: 16 }}>
|
||||
<Flex gap="2" align="center">
|
||||
<Heading
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import { ReactNode } from 'react';
|
||||
import { tankDefinitions } from '../../../../core/blitzkrieg/tankDefinitions';
|
||||
import { tankIcon } from '../../../../core/blitzkrieg/tankIcon';
|
||||
|
||||
interface TankopediaLayoutProps {
|
||||
children: ReactNode;
|
||||
params: { id: string };
|
||||
}
|
||||
|
||||
export default async function TankopediaLayout({
|
||||
children,
|
||||
params,
|
||||
}: TankopediaLayoutProps) {
|
||||
const id = Number(params.id);
|
||||
const awaitedTankDefinitions = await tankDefinitions;
|
||||
const tank = awaitedTankDefinitions[id];
|
||||
|
||||
return (
|
||||
<>
|
||||
<title>{tank.name}</title>
|
||||
<meta
|
||||
name="description"
|
||||
content={`Statistics, armor profiles, equipment, and more about ${tank.name}`}
|
||||
/>
|
||||
<meta property="og:image" content={tankIcon(id)} />
|
||||
|
||||
{children}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user