diff --git a/packages/website/src/components/Ad.tsx b/packages/website/src/components/Ad.tsx index ae5d455a5..706e90b5c 100644 --- a/packages/website/src/components/Ad.tsx +++ b/packages/website/src/components/Ad.tsx @@ -23,6 +23,8 @@ type AdProps = BoxProps & { }; export function Ad({ type, style, ...props }: AdProps) { + return null; + const id = useRef(uniqueId()); const dimensions = AD_DIMENSIONS[type]; diff --git a/packages/website/src/components/AdMidSectionResponsive.tsx b/packages/website/src/components/AdMidSectionResponsive.tsx index 2ec38d2e1..1e77d6002 100644 --- a/packages/website/src/components/AdMidSectionResponsive.tsx +++ b/packages/website/src/components/AdMidSectionResponsive.tsx @@ -2,6 +2,8 @@ import { Flex, type FlexProps } from '@radix-ui/themes'; import { Ad, AdType } from './Ad'; export function AdMidSectionResponsive(props: FlexProps) { + return null; + return ( {children} diff --git a/packages/website/src/components/PageWrapper.tsx b/packages/website/src/components/PageWrapper.tsx index 21463f0c2..a9d723812 100644 --- a/packages/website/src/components/PageWrapper.tsx +++ b/packages/website/src/components/PageWrapper.tsx @@ -1,6 +1,7 @@ import { Flex, type FlexProps, Theme } from '@radix-ui/themes'; import type { ComponentProps } from 'react'; import type { RadixSize } from '../stores/embedState'; +import { BlitzKitTheme } from './BlitzKitTheme'; type PageWrapperProps = FlexProps & { color?: ComponentProps['accentColor']; @@ -23,7 +24,7 @@ export function PageWrapper({ ...props }: PageWrapperProps) { return ( - {children} - + ); } diff --git a/packages/website/src/components/TankSearch/index.tsx b/packages/website/src/components/TankSearch/index.tsx index c2a410ae9..dc8fe9a2e 100644 --- a/packages/website/src/components/TankSearch/index.tsx +++ b/packages/website/src/components/TankSearch/index.tsx @@ -19,7 +19,6 @@ import { Fragment, memo, useEffect, useMemo, useState } from 'react'; import { filterTank } from '../../core/blitzkit/filterTank'; import { resolveReload } from '../../core/blitzkit/resolveReload'; import { useAdExempt } from '../../hooks/useAdExempt'; -import { useAwait } from '../../hooks/useAwait'; import { $tankFilters } from '../../stores/tankFilters'; import { SORT_NAMES, @@ -45,15 +44,20 @@ type TankSearchProps = Omit & { const PREVIEW_COUNT = 25; const DEFAULT_LOADED_CARDS = 75; +const awaitedGameDefinitions = await gameDefinitions; +const awaitedModelDefinitions = await modelDefinitions; +const awaitedTankDefinitions = await tankDefinitions; +const awaitedTanksDefinitionsArray = await tankDefinitionsArray; +const awaitedTankNames = await tankNames; + export const TankSearch = memo( ({ compact, onSelect, onSelectAll, ...props }) => { const exempt = useAdExempt(); - const awaitedGameDefinitions = useAwait(gameDefinitions); - console.log(awaitedGameDefinitions); - const awaitedModelDefinitions = useAwait(modelDefinitions); - const awaitedTankDefinitions = useAwait(tankDefinitions); - const awaitedTanksDefinitionsArray = useAwait(tankDefinitionsArray); - const awaitedTankNames = useAwait(tankNames); + // const awaitedGameDefinitions = useAwait(gameDefinitions); + // const awaitedModelDefinitions = useAwait(modelDefinitions); + // const awaitedTankDefinitions = useAwait(tankDefinitions); + // const awaitedTanksDefinitionsArray = useAwait(tankDefinitionsArray); + // const awaitedTankNames = useAwait(tankNames); const tankFilters = useStore($tankFilters); const tankopediaSort = useStore($tankopediaSort); @@ -405,7 +409,8 @@ export const TankSearch = memo( - {tanksFiltered.length} tank{tanksFiltered.length === 1 ? '' : 's'} + {tanksFiltered.length} tank + {tanksFiltered.length === 1 ? '' : 's'} {onSelectAll && ( diff --git a/packages/website/src/layouts/ToolLayout.astro b/packages/website/src/layouts/ToolLayout.astro index 94627a386..56e8de8aa 100644 --- a/packages/website/src/layouts/ToolLayout.astro +++ b/packages/website/src/layouts/ToolLayout.astro @@ -41,7 +41,7 @@ const tool = TOOLS.find((tool) => tool.id === toolId); style={{ backgroundImage: `url(${imgur(tool!.image, { format: 'jpeg', - size: ImgurSize.HugeThumbnail, + size: ImgurSize.SmallThumbnail, })})`, backgroundSize: 'cover', }} diff --git a/packages/website/src/pages/tools/tankopedia/index.astro b/packages/website/src/pages/tools/tankopedia/index.astro index b0bd282f6..e2518c71b 100644 --- a/packages/website/src/pages/tools/tankopedia/index.astro +++ b/packages/website/src/pages/tools/tankopedia/index.astro @@ -1,7 +1,8 @@ --- import ToolLayout from '../../../layouts/ToolLayout.astro'; +import { Page } from './index'; --- - + diff --git a/packages/website/src/pages/tools/tankopedia/index.tsx b/packages/website/src/pages/tools/tankopedia/index.tsx new file mode 100644 index 000000000..f7fa99162 --- /dev/null +++ b/packages/website/src/pages/tools/tankopedia/index.tsx @@ -0,0 +1,10 @@ +import { PageWrapper } from '../../../components/PageWrapper'; +import { TankSearch } from '../../../components/TankSearch'; + +export function Page() { + return ( + + + + ); +}