mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 15:52:55 +01:00
basic error screen
This commit is contained in:
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>
|
||||
Reference in new issue
Block a user