feat: handle duplicates

This commit is contained in:
tresabhi committed 2025-03-05 11:52:39 -06:00
1 parent 1fce9c1c88
commit 6a91e86b07
2 files changed
+93 -8

No files matched your search

@@ -1,5 +1,5 @@
---
import { Link } from '@radix-ui/themes';
import { LinkI18n } from '../../../components/LinkI18n';
import { PageWrapper } from '../../../components/PageWrapper';
import { tanksTool } from '../../../constants/tools';
import { awaitableTanks } from '../../../core/awaitables/tanks';
@@ -7,6 +7,8 @@ import ToolLayout from '../../../layouts/ToolLayout.astro';
export { getStaticPaths } from '../index.astro';
const locale = Astro.params.locale;
const tanks = await awaitableTanks;
---
@@ -14,7 +16,9 @@ const tanks = await awaitableTanks;
<PageWrapper>
{
tanks.tanks.map((tank) => (
<Link href={`./${tank.slug}`}>{tank.slug}</Link>
<LinkI18n {locale} href={`/tanks/${tank.slug}`}>
{tank.slug} ({tank.id})
</LinkI18n>
))
}
</PageWrapper>