mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 15:52:55 +01:00
feat: popular tanks
This commit is contained in:
1 parent
0ebf9f6c3d
commit
ea782af079
9 files changed
+125
-16
No files matched your search
@@ -11,7 +11,7 @@ const { locale } = Astro.props;
|
||||
const tankList = await api.tankList();
|
||||
---
|
||||
|
||||
<BaseLayout selectedTool={tools.tanks} {locale} accent="purple">
|
||||
<BaseLayout {locale} accent="purple">
|
||||
<ToolBanner {locale} tool={tools.tanks} slot="pre-app" />
|
||||
|
||||
<h1>tanks</h1>
|
||||
@@ -20,6 +20,7 @@ const tankList = await api.tankList();
|
||||
tankList.list.map(({ id, slug }) => (
|
||||
<p>
|
||||
<a href={`/tanks/${slug}`}>
|
||||
<img height="128" width="128" src={`/api/tanks/${id}.webp`} />
|
||||
{slug} ({id})
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import { api } from "../../../core/api/dynamic";
|
||||
|
||||
export async function GET() {
|
||||
throw new Error("MAKE THIS A PROTO AND ADD LAST UPDATED TIME");
|
||||
const popular = await api.popularTanks();
|
||||
return Response.json(popular);
|
||||
}
|
||||
Reference in new issue
Block a user