2023-12-03 19:45:43 -06:00
|
|
|
'use client';
|
|
|
|
|
|
2024-04-19 09:26:53 -05:00
|
|
|
import { Flex } from '@radix-ui/themes';
|
2024-06-10 14:08:31 -05:00
|
|
|
import { times } from 'lodash';
|
2024-01-21 11:06:40 -06:00
|
|
|
import { useRouter } from 'next/navigation';
|
2024-06-10 13:52:25 -05:00
|
|
|
import { Ad, AdType } from '../../../components/Ad';
|
2023-11-30 12:21:20 -06:00
|
|
|
import PageWrapper from '../../../components/PageWrapper';
|
2024-06-15 13:24:53 -05:00
|
|
|
import { useAdExempt } from '../../../hooks/useAdExempt';
|
2024-01-21 11:06:40 -06:00
|
|
|
import { TankSearch } from './components/TankSearch';
|
2023-11-30 12:21:20 -06:00
|
|
|
|
2023-11-30 18:00:48 -06:00
|
|
|
export default function Page() {
|
2024-01-21 11:06:40 -06:00
|
|
|
const router = useRouter();
|
2024-06-15 13:24:53 -05:00
|
|
|
const exempt = useAdExempt();
|
2023-12-03 19:45:43 -06:00
|
|
|
|
2023-11-30 12:21:20 -06:00
|
|
|
return (
|
2024-03-31 22:27:11 -05:00
|
|
|
<PageWrapper size={1200} color="purple">
|
2024-02-06 15:01:03 -06:00
|
|
|
<TankSearch
|
|
|
|
|
onSelect={(tank) => {
|
|
|
|
|
router.push(`./tankopedia/${tank.id}`);
|
|
|
|
|
}}
|
|
|
|
|
/>
|
2024-04-19 09:26:53 -05:00
|
|
|
|
2024-06-15 13:24:53 -05:00
|
|
|
{!exempt && (
|
|
|
|
|
<Flex justify="center" wrap="wrap">
|
|
|
|
|
{times(2, (index) => (
|
|
|
|
|
<Ad key={index} type={AdType.MediumRectangleHorizontalPurple} />
|
|
|
|
|
))}
|
|
|
|
|
</Flex>
|
|
|
|
|
)}
|
2023-11-30 12:21:20 -06:00
|
|
|
</PageWrapper>
|
|
|
|
|
);
|
|
|
|
|
}
|