mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: preview image
This commit is contained in:
1 parent
26a5fdea0e
commit
70f7698466
2 files changed
+30
-2
No files matched your search
@@ -13,8 +13,6 @@ export function Title() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<title>{protagonist.tank.name}</title>
|
|
||||||
|
|
||||||
<Flex gap="6" justify="center" align="center" style={{ padding: 16 }}>
|
<Flex gap="6" justify="center" align="center" style={{ padding: 16 }}>
|
||||||
<Flex gap="2" align="center">
|
<Flex gap="2" align="center">
|
||||||
<Heading
|
<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