basic error screen

This commit is contained in:
tresabhi committed 2026-05-19 14:38:28 -05:00
1 parent 676601b06e
commit 2b955a281b
13 files changed
+143 -21

No files matched your search

@@ -1,5 +1,6 @@
import { Fragment, useMemo } from "react";
import { api } from "../../../../api/dynamic";
import { ErrorWrapper } from "../../../../components/ErrorWrapper";
import { TankopediaLoadout } from "../../../../components/TankopediaLoadout";
import { useAwait } from "../../../../hooks/useAwait";
import { useCharacteristicRenderer } from "../../../../hooks/useCharacteristicRenderer";
@@ -14,7 +15,15 @@ interface PageProps {
locale: string;
}
export function Page({ id, locale }: PageProps) {
export function Page(props: PageProps) {
return (
<ErrorWrapper>
<Wrapper {...props} />
</ErrorWrapper>
);
}
function Wrapper({ id, locale }: PageProps) {
const tank = useAwait(() => api.tank(id), `tank-${id}`);
Tankopedia.useInitialization(tank);
@@ -19,6 +19,5 @@ const { id, locale } = Astro.props;
---
<BaseLayout {locale} accent="violet">
<Page {locale} {id} client:load />
</BaseLayout>