Files
blitzkit/packages/website-ue/src/pages/[...locale]/tanks/_index.tsx
T

29 lines
720 B
TypeScript
Raw Normal View History

2026-04-26 18:19:09 -05:00
import { TankCard } from "../../../components/TankCard";
import { TankCards } from "../../../components/TankCards";
import { api } from "../../../core/api/dynamic";
import { useAwait } from "../../../hooks/useAwait";
import { LocaleProvider } from "../../../hooks/useLocale";
interface PageProps {
locale: string;
}
export function Page({ locale, ...props }: PageProps) {
return (
<LocaleProvider locale={locale}>
<Content {...props} />
</LocaleProvider>
);
}
function Content() {
const tankList = useAwait(() => api.tankList(), "tank-list");
return (
<TankCards>
2026-04-26 19:31:16 -05:00
{tankList.list.slice(0, 32).map(({ id }) => (
2026-04-26 18:19:09 -05:00
<TankCard key={id} id={id} />
))}
</TankCards>
);
}