free agents
This commit is contained in:
@@ -3,9 +3,13 @@ import { tournamentQueries, useCurrentTournament } from "@/features/tournaments/
|
||||
import UpcomingTournament from "@/features/tournaments/components/upcoming-tournament";
|
||||
import { ensureServerQueryData } from "@/lib/tanstack-query/utils/ensure";
|
||||
import StartedTournament from "@/features/tournaments/components/started-tournament";
|
||||
import { Suspense } from "react";
|
||||
import UpcomingTournamentSkeleton from "@/features/tournaments/components/upcoming-tournament/skeleton";
|
||||
|
||||
export const Route = createFileRoute("/_authed/")({
|
||||
component: Home,
|
||||
component: () => <Suspense fallback={<UpcomingTournamentSkeleton />}>
|
||||
<Home />
|
||||
</Suspense>,
|
||||
beforeLoad: async ({ context }) => {
|
||||
const queryClient = context.queryClient;
|
||||
const tournament = await ensureServerQueryData(queryClient, tournamentQueries.current())
|
||||
@@ -18,6 +22,7 @@ export const Route = createFileRoute("/_authed/")({
|
||||
title: context.tournament.name || "FLXN"
|
||||
}
|
||||
}),
|
||||
pendingComponent: () => <UpcomingTournamentSkeleton />
|
||||
});
|
||||
|
||||
function Home() {
|
||||
|
||||
@@ -7,7 +7,7 @@ export const Route = createFileRoute("/_authed/stats")({
|
||||
component: Stats,
|
||||
beforeLoad: async ({ context }) => {
|
||||
const queryClient = context.queryClient;
|
||||
await ensureServerQueryData(queryClient, playerQueries.allStats());
|
||||
ensureServerQueryData(queryClient, playerQueries.allStats());
|
||||
},
|
||||
loader: () => ({
|
||||
withPadding: false,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import TeamProfile from "@/features/teams/components/team-profile";
|
||||
import { teamKeys, teamQueries } from "@/features/teams/queries";
|
||||
import { ensureServerQueryData } from "@/lib/tanstack-query/utils/ensure";
|
||||
import { prefetchServerQuery } from "@/lib/tanstack-query/utils/prefetch";
|
||||
import { redirect, createFileRoute } from "@tanstack/react-router";
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import { z } from "zod";
|
||||
|
||||
const searchSchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user