mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 15:52:55 +01:00
feat: lint fixes
This commit is contained in:
1 parent
60a29ef2e7
commit
6ec7a50320
10 files changed
+55
-15
No files matched your search
@@ -10,6 +10,7 @@ import BaseLayout from "../../../layouts/BaseLayout.astro";
|
||||
|
||||
export { getStaticPaths } from "../index.astro";
|
||||
|
||||
const { locale } = Astro.props;
|
||||
const root = `/src/pages/api`;
|
||||
const globbed = import.meta.glob("/src/pages/api/**/*", {
|
||||
eager: true,
|
||||
@@ -47,7 +48,7 @@ for (const fullPath in globbed) {
|
||||
paths.sort((a, b) => a.path.localeCompare(b.path));
|
||||
---
|
||||
|
||||
<BaseLayout accent="amber">
|
||||
<BaseLayout {locale} accent="amber">
|
||||
<h1>api</h1>
|
||||
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ interface ContentProps {
|
||||
|
||||
const indexingPattern = /.+_(\d+)$/;
|
||||
|
||||
function Content({ skeleton }: ContentProps) {
|
||||
function Content({}: ContentProps) {
|
||||
const locale = useLocale();
|
||||
const { avatars } = useAwait(() => api.avatars(), "avatars");
|
||||
const profileAvatarEntityStrings = useGameStrings("ProfileAvatarEntity");
|
||||
|
||||
@@ -5,10 +5,11 @@ import BaseLayout from "../../../layouts/BaseLayout.astro";
|
||||
|
||||
export { getStaticPaths } from "../index.astro";
|
||||
|
||||
const { locale } = Astro.props;
|
||||
const { backgrounds } = await api.backgrounds();
|
||||
---
|
||||
|
||||
<BaseLayout accent="amber">
|
||||
<BaseLayout {locale} accent="amber">
|
||||
{
|
||||
backgrounds.map((background) => {
|
||||
return (
|
||||
|
||||
@@ -19,8 +19,8 @@ export function Page({ id }: { id: string }) {
|
||||
|
||||
function Content({ id }: { id: string }) {
|
||||
const tank = useAwait(() => api.tank(id), `tank-${id}`);
|
||||
const tankList = useAwait(() => api.tankList(), "tank-list");
|
||||
const otherTanks = useAwait(() => api.tanks(), "tanks");
|
||||
// const tankList = useAwait(() => api.tankList(), "tank-list");
|
||||
// const otherTanks = useAwait(() => api.tanks(), "tanks");
|
||||
|
||||
Tankopedia.useInitialization(tank.tank!);
|
||||
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
---
|
||||
import "@radix-ui/colors/violet-dark.css";
|
||||
import type { GetStaticPaths } from "astro";
|
||||
import { api } from "../../../../core/api/dynamic";
|
||||
import { mixStaticPaths } from "../../../../core/astro/mixStaticPaths";
|
||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||
import { getStaticPaths as _getStaticPaths } from "../index.astro";
|
||||
import { Page } from "./_index";
|
||||
|
||||
export const getStaticPaths = (async () => {
|
||||
export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
||||
const { list } = await api.tankList();
|
||||
|
||||
return list.map((tank) => ({
|
||||
params: { slug: tank.slug },
|
||||
props: { id: tank.id },
|
||||
}));
|
||||
}) satisfies GetStaticPaths;
|
||||
});
|
||||
|
||||
const { id } = Astro.props;
|
||||
const { id, locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout accent="violet">
|
||||
<BaseLayout {locale} accent="violet">
|
||||
<Page {id} client:load />
|
||||
</BaseLayout>
|
||||
Reference in new issue
Block a user