diff --git a/.vscode/settings.json b/.vscode/settings.json index 7c8a532cb..923aa3721 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -93,6 +93,7 @@ "Minotauro", "MIPMAPCOUNT", "miĊĦek", + "mmnow", "modeltransform", "MURICA", "NEGATIVEX", diff --git a/src/app/tools/tankopedia/page.tsx b/src/app/tools/tankopedia/page.tsx index a2cb744af..a1bc1965f 100644 --- a/src/app/tools/tankopedia/page.tsx +++ b/src/app/tools/tankopedia/page.tsx @@ -3,6 +3,7 @@ import { Flex } from '@radix-ui/themes'; import Link from 'next/link'; import { useRouter } from 'next/navigation'; +import { Ad, AdType } from '../../../components/Ad'; import PageWrapper from '../../../components/PageWrapper'; import { TankSearch } from './components/TankSearch'; @@ -11,6 +12,10 @@ export default function Page() { return ( + + + + { router.push(`./tankopedia/${tank.id}`); diff --git a/src/components/Ad.tsx b/src/components/Ad.tsx new file mode 100644 index 000000000..d303ee603 --- /dev/null +++ b/src/components/Ad.tsx @@ -0,0 +1,21 @@ +'use client'; + +import { ComponentProps, useEffect } from 'react'; + +export enum AdType { + TankopediaHorizontal800 = 738182777, +} + +interface AdProps extends ComponentProps<'div'> { + type: AdType; +} + +export function Ad({ type, ...props }: AdProps) { + useEffect(() => { + (window as any).msAdsQueue.push(function () { + (window as any).mmnow.render({ adUnitId: type, elementId: type }); + }); + }); + + return
; +} diff --git a/src/components/Ads/Horizontal.tsx b/src/components/Ads/Horizontal.tsx deleted file mode 100644 index 4a66a4dcb..000000000 --- a/src/components/Ads/Horizontal.tsx +++ /dev/null @@ -1,24 +0,0 @@ -export function AdHorizontal() { - return ( - <> -