restore suspense boundary in stats
This commit is contained in:
@@ -5,7 +5,7 @@ import { Suspense } from "react";
|
|||||||
import PlayerStatsTableSkeleton from "@/features/players/components/player-stats-table-skeleton";
|
import PlayerStatsTableSkeleton from "@/features/players/components/player-stats-table-skeleton";
|
||||||
import { prefetchServerQuery } from "@/lib/tanstack-query/utils/prefetch";
|
import { prefetchServerQuery } from "@/lib/tanstack-query/utils/prefetch";
|
||||||
import LeagueHeadToHead from "@/features/players/components/league-head-to-head";
|
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")({
|
export const Route = createFileRoute("/_authed/stats")({
|
||||||
component: Stats,
|
component: Stats,
|
||||||
@@ -38,7 +38,9 @@ function Stats() {
|
|||||||
</Tabs.Panel>
|
</Tabs.Panel>
|
||||||
|
|
||||||
<Tabs.Panel value="h2h">
|
<Tabs.Panel value="h2h">
|
||||||
|
<Suspense fallback={<Box w='100vw' py='xl'><Loader ml='45vw' /></Box>}>
|
||||||
<LeagueHeadToHead />
|
<LeagueHeadToHead />
|
||||||
|
</Suspense>
|
||||||
</Tabs.Panel>
|
</Tabs.Panel>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user