diff --git a/src/app/tools/tankopedia/[id]/components/AntagonistBar.tsx b/src/app/tools/tankopedia/[id]/components/AntagonistBar.tsx
index 9ed4b869b..dbdb90fcb 100644
--- a/src/app/tools/tankopedia/[id]/components/AntagonistBar.tsx
+++ b/src/app/tools/tankopedia/[id]/components/AntagonistBar.tsx
@@ -1,4 +1,4 @@
-import { CaretRightIcon, Cross1Icon, ShuffleIcon } from '@radix-ui/react-icons';
+import { Cross1Icon, ShuffleIcon } from '@radix-ui/react-icons';
import {
Button,
Card,
@@ -6,10 +6,8 @@ import {
Flex,
Heading,
Tabs,
- Text,
Tooltip,
} from '@radix-ui/themes';
-import { useRouter } from 'next/navigation';
import { useState } from 'react';
import { ModuleButton } from '../../../../../components/ModuleButtons/ModuleButton';
import { ShellButton } from '../../../../../components/ModuleButtons/ShellButton';
@@ -37,238 +35,251 @@ export function AntagonistBar({ floating }: AntagonistBarProps) {
const [tab, setTab] = useState('search');
const [antagonistSelectorOpen, setAntagonistSelectorVisible] =
useState(false);
- const router = useRouter();
if (mode !== 'armor') return null;
return (
-
-
-
- {antagonist.gun.shells.map((shell, index) => {
- return (
- {
- mutateDuel((draft) => {
- draft.antagonist!.shell = shell;
- mutateTankopediaTemporary((draft) => {
- draft.shot = undefined;
- });
- });
- }}
- />
- );
- })}
-
-
-
- {!floating && Versus}
-
- {floating && (
-
- Versus {antagonist.tank.name}
-
-
- )}
-
- {!floating && (
-
-
-
-
-
-
-
-
-
-
-
-
-
- Search
- Configure
-
-
-
-
- {
- mutateDuel((draft) => {
- draft.antagonist!.tank = tank;
- draft.antagonist!.engine = tank.engines.at(-1)!;
- draft.antagonist!.track = tank.tracks.at(-1)!;
- draft.antagonist!.turret = tank.turrets.at(-1)!;
- draft.antagonist!.gun =
- draft.antagonist!.turret.guns.at(-1)!;
- draft.antagonist!.shell =
- draft.antagonist!.gun.shells[0];
- });
- setAntagonistSelectorVisible(false);
- }}
- />
-
-
-
-
-
-
-
- {antagonist.tank.name} modules
-
-
-
-
- {antagonist.tank.turrets.map((turret, index) => (
-
- {
- mutateDuel((draft) => {
- draft.antagonist!.turret = turret;
- draft.antagonist!.gun =
- turret.guns.at(-1)!;
- draft.antagonist!.shell =
- draft.antagonist!.gun.shells[0];
- });
- mutateTankopediaTemporary((draft) => {
- draft.shot = undefined;
- });
- }}
- selected={
- antagonist.turret.id === turret.id
- }
- discriminator={
- TIER_ROMAN_NUMERALS[turret.tier]
- }
- module="turret"
- />
-
- ))}
-
-
- {antagonist.turret.guns.map((gun, index) => (
-
- {
- mutateDuel((draft) => {
- draft.antagonist!.gun = gun;
- draft.antagonist!.shell = gun.shells[0];
- });
- }}
- selected={antagonist.gun.id === gun.id}
- discriminator={
- TIER_ROMAN_NUMERALS[gun.tier]
- }
- module="gun"
- />
-
- ))}
-
-
-
-
-
- Properties
-
-
- -
- Turret: {antagonist.turret.name}
-
- -
- Gun: {antagonist.gun.name}
-
- - Shells:
-
- {antagonist.gun.shells.map((shell) => (
- -
- {SHELL_NAMES[shell.type]}:{' '}
-
- {resolveNearPenetration(shell.penetration)}
- mm
-
- , {shell.damage.armor}HP
-
- ))}
-
-
-
-
-
-
-
-
-
- )}
-
-
-
-
-
+
+ {antagonist.gun.shells.map((shell, index) => {
+ return (
+ {
+ mutateDuel((draft) => {
+ draft.antagonist!.shell = shell;
+ mutateTankopediaTemporary((draft) => {
+ draft.shot = undefined;
+ });
+ });
+ }}
+ />
+ );
+ })}
+
+
+
+
+
+ {floating && (
+
+ Versus {antagonist.tank.name}
+
+
+ )}
+
+ {!floating && (
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Search
+ Configure
+
+
+
+
+ {
+ mutateDuel((draft) => {
+ draft.antagonist!.tank = tank;
+ draft.antagonist!.engine = tank.engines.at(-1)!;
+ draft.antagonist!.track = tank.tracks.at(-1)!;
+ draft.antagonist!.turret = tank.turrets.at(-1)!;
+ draft.antagonist!.gun =
+ draft.antagonist!.turret.guns.at(-1)!;
+ draft.antagonist!.shell =
+ draft.antagonist!.gun.shells[0];
+ });
+ setAntagonistSelectorVisible(false);
+ }}
+ />
+
+
+
+
+
+
+
+ {antagonist.tank.name} modules
+
+
+
+
+ {antagonist.tank.turrets.map(
+ (turret, index) => (
+
+ {
+ mutateDuel((draft) => {
+ draft.antagonist!.turret = turret;
+ draft.antagonist!.gun =
+ turret.guns.at(-1)!;
+ draft.antagonist!.shell =
+ draft.antagonist!.gun.shells[0];
+ });
+ mutateTankopediaTemporary((draft) => {
+ draft.shot = undefined;
+ });
+ }}
+ selected={
+ antagonist.turret.id === turret.id
+ }
+ discriminator={
+ TIER_ROMAN_NUMERALS[turret.tier]
+ }
+ module="turret"
+ />
+
+ ),
+ )}
+
+
+ {antagonist.turret.guns.map((gun, index) => (
+
+ {
+ mutateDuel((draft) => {
+ draft.antagonist!.gun = gun;
+ draft.antagonist!.shell =
+ gun.shells[0];
+ });
+ }}
+ selected={antagonist.gun.id === gun.id}
+ discriminator={
+ TIER_ROMAN_NUMERALS[gun.tier]
+ }
+ module="gun"
+ />
+
+ ))}
+
+
+
+
+
+ Properties
+
+
+ -
+ Turret: {antagonist.turret.name}
+
+ -
+ Gun: {antagonist.gun.name}
+
+ - Shells:
+
+ {antagonist.gun.shells.map((shell) => (
+ -
+ {SHELL_NAMES[shell.type]}:{' '}
+
+ {resolveNearPenetration(
+ shell.penetration,
+ )}
+ mm
+
+ , {shell.damage.armor}HP
+
+ ))}
+
+
+
+
+
+
+
+
+
+ )}
+
+
+
+
);
}