From 690ed2aa7e8615bbf8e119cdc3f36587d3886aeb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com>
Date: Tue, 11 Jun 2024 19:49:15 -0500
Subject: [PATCH] feat: stricter ad boundaries
---
src/app/tools/tankopedia/map/page.tsx | 26 --------------------------
src/app/tools/tankopedia/page.tsx | 5 -----
src/components/Ad.tsx | 26 ++++++++++++--------------
3 files changed, 12 insertions(+), 45 deletions(-)
delete mode 100644 src/app/tools/tankopedia/map/page.tsx
diff --git a/src/app/tools/tankopedia/map/page.tsx b/src/app/tools/tankopedia/map/page.tsx
deleted file mode 100644
index 0f55246cb..000000000
--- a/src/app/tools/tankopedia/map/page.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-'use client';
-
-import { Flex, Link } from '@radix-ui/themes';
-import { use } from 'react';
-import PageWrapper from '../../../../components/PageWrapper';
-import { tankDefinitions } from '../../../../core/blitzkit/tankDefinitions';
-
-export default function Page() {
- const awaitedTankDefinitions = use(tankDefinitions);
-
- return (
-
- Super duper secret map for SEO
-
-
- {Object.values(awaitedTankDefinitions)
- .sort((a, b) => b.tier - a.tier)
- .map((tank) => (
-
- {tank.name}
-
- ))}
-
-
- );
-}
diff --git a/src/app/tools/tankopedia/page.tsx b/src/app/tools/tankopedia/page.tsx
index 1db60188f..31d7bd068 100644
--- a/src/app/tools/tankopedia/page.tsx
+++ b/src/app/tools/tankopedia/page.tsx
@@ -2,7 +2,6 @@
import { Flex } from '@radix-ui/themes';
import { times } from 'lodash';
-import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { Ad, AdType } from '../../../components/Ad';
import PageWrapper from '../../../components/PageWrapper';
@@ -24,10 +23,6 @@ export default function Page() {
))}
-
-
- Super duper secret map
-
);
}
diff --git a/src/components/Ad.tsx b/src/components/Ad.tsx
index f8e05abc7..fef5a0fea 100644
--- a/src/components/Ad.tsx
+++ b/src/components/Ad.tsx
@@ -5,7 +5,6 @@ import { uniqueId } from 'lodash';
import { useEffect, useRef } from 'react';
import { Vector2Tuple } from 'three';
import { imgur } from '../core/blitzkit/imgur';
-import { useApp } from '../stores/app';
export enum AdType {
MediumRectangleHorizontalPurple = 738182777,
@@ -28,7 +27,6 @@ type AdProps = BoxProps & {
export function Ad({ type, style, ...props }: AdProps) {
const id = useRef(uniqueId());
const dimensions = AD_DIMENSIONS[type];
- const developerMode = useApp((state) => state.developerMode);
useEffect(() => {
(window as any).msAdsQueue.push(function () {
@@ -44,10 +42,12 @@ export function Ad({ type, style, ...props }: AdProps) {
position="relative"
width={`${dimensions[0]}px`}
height={`${dimensions[1]}px`}
+ overflow="hidden"
style={{
outline: '1px solid var(--gray-3)',
borderRadius: 'var(--radius-1)',
background: `url(${imgur('DK21EHY')})`,
+
...style,
}}
{...props}
@@ -60,20 +60,18 @@ export function Ad({ type, style, ...props }: AdProps) {
direction="column"
align="center"
>
- {!developerMode && Advertisement}
- {developerMode && (
- <>
-
- {AdType[type]}
-
-
- {dimensions[0]}x{dimensions[1]}
-
- >
- )}
+ Advertisement
+
+ {dimensions[0]}x{dimensions[1]}
+
-
+
);
}