Files
blitzkit/src/app/page.tsx
T

116 lines
2.7 KiB
TypeScript
Raw Normal View History

2024-06-15 13:51:42 -05:00
'use client';
2024-06-29 21:22:12 -05:00
import { Box, Flex } from '@radix-ui/themes';
2024-06-15 13:51:42 -05:00
import { Ad, AdType } from '../components/Ad';
import { AdMidSectionResponsive } from '../components/AdMidSectionResponsive';
import {
compareTool,
discordTool,
moreTool,
2024-06-16 17:47:02 -05:00
playerStatsTool,
2024-06-15 13:51:42 -05:00
ratingTool,
sessionTool,
tankopediaTool,
2024-06-29 21:22:12 -05:00
tankPerformanceTool,
2024-06-15 13:51:42 -05:00
} from '../constants/tools';
2024-06-15 14:01:51 -05:00
import { useAdExempt } from '../hooks/useAdExempt';
2024-06-03 18:28:09 -05:00
import { Hero } from './components/Hero';
2024-06-15 13:16:12 -05:00
import { PatreonPlug } from './components/PatreonPlug';
2024-06-15 13:51:42 -05:00
import { ToolCard } from './components/ToolCard';
2024-05-21 14:18:21 -05:00
2023-09-07 01:13:03 +00:00
export default function Page() {
2024-06-15 14:01:51 -05:00
const exempt = useAdExempt();
2023-09-12 02:38:50 +00:00
return (
2024-05-20 14:16:13 -05:00
<>
2024-06-03 18:28:09 -05:00
<Hero />
2024-06-15 13:16:12 -05:00
<PatreonPlug />
2024-06-15 14:01:51 -05:00
<Flex
p="4"
justify={
exempt
? 'center'
: {
initial: 'center',
lg: 'between',
}
}
gap="4"
>
{!exempt && (
<Ad
type={AdType.WideSkyscraperVerticalPurple}
display={{
initial: 'none',
lg: 'block',
}}
/>
)}
2024-06-15 13:51:42 -05:00
<Flex maxWidth="1024px" flexGrow="1" gap="4" direction="column">
<ToolCard tool={tankopediaTool} />
2024-06-15 14:01:51 -05:00
{!exempt && (
<Flex
justify="center"
display={{
initial: 'flex',
lg: 'none',
}}
>
<AdMidSectionResponsive />
</Flex>
)}
2024-06-03 17:46:59 -05:00
2024-06-15 13:51:42 -05:00
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
2024-06-16 17:47:02 -05:00
<ToolCard tool={playerStatsTool} />
2024-06-29 21:22:12 -05:00
<ToolCard tool={compareTool} />
2024-06-15 13:51:42 -05:00
</Flex>
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
2024-06-29 21:22:12 -05:00
<ToolCard tool={tankPerformanceTool} />
2024-06-16 17:47:02 -05:00
<ToolCard tool={sessionTool} />
2024-06-15 13:51:42 -05:00
</Flex>
2024-06-15 14:01:51 -05:00
{!exempt && (
<Flex
justify="center"
display={{
initial: 'flex',
md: 'none',
}}
>
<AdMidSectionResponsive />
</Flex>
)}
2024-06-15 13:51:42 -05:00
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
2024-06-29 21:22:12 -05:00
<ToolCard tool={ratingTool} />
2024-06-16 17:47:02 -05:00
<ToolCard tool={discordTool} />
2024-06-29 21:22:12 -05:00
</Flex>
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
2024-06-15 13:51:42 -05:00
<ToolCard tool={moreTool} />
2024-06-29 21:22:12 -05:00
<Box flexGrow="1" />
2024-06-15 13:51:42 -05:00
</Flex>
</Flex>
2024-06-15 14:01:51 -05:00
{!exempt && (
<Ad
type={AdType.WideSkyscraperVerticalPurple}
display={{
initial: 'none',
lg: 'block',
}}
/>
)}
2024-06-15 13:51:42 -05:00
</Flex>
2024-06-15 14:01:51 -05:00
{!exempt && <AdMidSectionResponsive />}
2024-05-22 13:57:57 -05:00
2024-05-20 14:16:13 -05:00
<div style={{ flex: 1 }} />
</>
2023-09-12 02:38:50 +00:00
);
2023-09-07 01:13:03 +00:00
}