mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
fix: rename to pushTankopediaPath
This commit is contained in:
1 parent
2e9388d3c7
commit
ca9f991bcb
3 files changed
+5
-5
No files matched your search
@@ -15,11 +15,11 @@ import { ModuleButton } from '../../../../../components/ModuleButtons/ModuleButt
|
||||
import { ShellButton } from '../../../../../components/ModuleButtons/ShellButton';
|
||||
import { SmallTankIcon } from '../../../../../components/SmallTankIcon';
|
||||
import { resolveNearPenetration } from '../../../../../core/blitz/resolveNearPenetration';
|
||||
import { pushTankopediaPath } from '../../../../../core/blitzkrieg/pushTankopediaPath';
|
||||
import {
|
||||
SHELL_NAMES,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
} from '../../../../../core/blitzkrieg/tankDefinitions';
|
||||
import { updateTankopediaUrl } from '../../../../../core/blitzkrieg/updateTankopediaURL';
|
||||
import { mutateDuel, useDuel } from '../../../../../stores/duel';
|
||||
import {
|
||||
mutateTankopediaTemporary,
|
||||
@@ -262,7 +262,7 @@ export function AntagonistBar({ floating }: AntagonistBarProps) {
|
||||
draft.antagonist,
|
||||
draft.protagonist,
|
||||
];
|
||||
updateTankopediaUrl(draft.antagonist!.tank.id);
|
||||
pushTankopediaPath(draft.antagonist!.tank.id);
|
||||
});
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, Dialog, Flex, Heading } from '@radix-ui/themes';
|
||||
import { useState } from 'react';
|
||||
import { TREE_TYPE_ICONS } from '../../../../../components/Tanks';
|
||||
import { assignDuelMember } from '../../../../../core/blitzkrieg/assignDuelMember';
|
||||
import { updateTankopediaUrl } from '../../../../../core/blitzkrieg/updateTankopediaURL';
|
||||
import { pushTankopediaPath } from '../../../../../core/blitzkrieg/pushTankopediaPath';
|
||||
import { useDuel } from '../../../../../stores/duel';
|
||||
import { TankSearch } from '../../components/TankSearch';
|
||||
|
||||
@@ -66,7 +66,7 @@ export function Title() {
|
||||
onSelect={(tank) => {
|
||||
assignDuelMember('protagonist', tank.id);
|
||||
setChangeTankDialogOpen(false);
|
||||
updateTankopediaUrl(tank.id);
|
||||
pushTankopediaPath(tank.id);
|
||||
}}
|
||||
/>
|
||||
</Flex>
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
export function updateTankopediaUrl(id: number) {
|
||||
export function pushTankopediaPath(id: number) {
|
||||
window.history.pushState(null, '', `/tools/tankopedia/${id}`);
|
||||
}
|
||||
Reference in new issue
Block a user