restore suspense boundary in stats

This commit is contained in:
yohlo
2025-10-13 13:00:29 -05:00
parent 939d1cee90
commit 168ef1b05d

View File

@@ -5,7 +5,7 @@ import { Suspense } from "react";
import PlayerStatsTableSkeleton from "@/features/players/components/player-stats-table-skeleton";
import { prefetchServerQuery } from "@/lib/tanstack-query/utils/prefetch";
import LeagueHeadToHead from "@/features/players/components/league-head-to-head";
import { Tabs } from "@mantine/core";
import { Box, Loader, Tabs } from "@mantine/core";
export const Route = createFileRoute("/_authed/stats")({
component: Stats,
@@ -38,7 +38,9 @@ function Stats() {
</Tabs.Panel>
<Tabs.Panel value="h2h">
<LeagueHeadToHead />
<Suspense fallback={<Box w='100vw' py='xl'><Loader ml='45vw' /></Box>}>
<LeagueHeadToHead />
</Suspense>
</Tabs.Panel>
</Tabs>
);