fix: no tanks heads up in /ownedtanks

This commit is contained in:
TresAbhi committed 2023-06-06 16:53:13 +00:00
1 parent 524edac615
commit 238661ac16
15 files changed
+38 -31

No files matched your search

+15 -10
View File
@@ -1,4 +1,5 @@
import { SlashCommandBuilder } from 'discord.js';
import NoData, { NoDataType } from '../components/NoData.js';
import PoweredByWargaming from '../components/PoweredByWargaming.js';
import * as Tanks from '../components/Tanks/index.js';
import TitleBar from '../components/TitleBar.js';
@@ -88,16 +89,20 @@ export default {
}`}
/>
<Tanks.Root>
{tanks.map((tank) => (
<Tanks.Item
key={tank.tank_id}
name={tank.name}
type={tank.type}
icon={tank.images.normal}
/>
))}
</Tanks.Root>
{tanks.length === 0 && <NoData type={NoDataType.TanksFound} />}
{tanks.length > 0 && (
<Tanks.Root>
{tanks.map((tank) => (
<Tanks.Item
key={tank.tank_id}
name={tank.name}
type={tank.type}
icon={tank.images.normal}
/>
))}
</Tanks.Root>
)}
<PoweredByWargaming />
</Wrapper>,