mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 11:39:51 +01:00
unselect all equipment button
This commit is contained in:
1 parent
c678830fd2
commit
f945786e2f
2 files changed
+18
No files matched your search
@@ -5,9 +5,11 @@ import { StandardPrice } from "@protos/blitz_static_standard_price";
|
|||||||
import type { UpgradeLine } from "@protos/blitz_static_tank_upgrade_line";
|
import type { UpgradeLine } from "@protos/blitz_static_tank_upgrade_line";
|
||||||
import type { StageParameters } from "@protos/blitz_static_tank_upgrade_single_stage";
|
import type { StageParameters } from "@protos/blitz_static_tank_upgrade_single_stage";
|
||||||
import {
|
import {
|
||||||
|
ButtonIcon,
|
||||||
CornerBottomLeftIcon,
|
CornerBottomLeftIcon,
|
||||||
DoubleArrowLeftIcon,
|
DoubleArrowLeftIcon,
|
||||||
DoubleArrowRightIcon,
|
DoubleArrowRightIcon,
|
||||||
|
TrashIcon,
|
||||||
} from "@radix-ui/react-icons";
|
} from "@radix-ui/react-icons";
|
||||||
import { chunk } from "lodash-es";
|
import { chunk } from "lodash-es";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
@@ -76,6 +78,19 @@ function Equipment() {
|
|||||||
<div className={styles.section}>
|
<div className={styles.section}>
|
||||||
<div className={styles.header}>
|
<div className={styles.header}>
|
||||||
<Heading size="4">{strings.tanks.loadout.equipment}</Heading>
|
<Heading size="4">{strings.tanks.loadout.equipment}</Heading>
|
||||||
|
|
||||||
|
<IconButton
|
||||||
|
color="red"
|
||||||
|
onClick={() => {
|
||||||
|
Tankopedia.mutate((draft) => {
|
||||||
|
for (const key in draft.protagonist.equipment) {
|
||||||
|
delete draft.protagonist.equipment[key];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<TrashIcon />
|
||||||
|
</IconButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.equipment}>
|
<div className={styles.equipment}>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { mixStaticPaths } from "../../../../astro/mixStaticPaths";
|
|||||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||||
import { getStaticPaths as _getStaticPaths } from "../index.astro";
|
import { getStaticPaths as _getStaticPaths } from "../index.astro";
|
||||||
import { Page } from "./_index";
|
import { Page } from "./_index";
|
||||||
|
import ColorScale from "../../../../components/ColorScale.astro";
|
||||||
|
|
||||||
export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
||||||
const { list } = await api.tankList();
|
const { list } = await api.tankList();
|
||||||
@@ -19,5 +20,7 @@ const { id, locale } = Astro.props;
|
|||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout {locale} accent="violet">
|
<BaseLayout {locale} accent="violet">
|
||||||
|
<ColorScale color="red" />
|
||||||
|
|
||||||
<Page {locale} {id} client:load />
|
<Page {locale} {id} client:load />
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
Reference in new issue
Block a user