swipeable tabs use url
This commit is contained in:
@@ -10,8 +10,14 @@ import TeamList from '@/features/teams/components/team-list';
|
||||
import Button from '@/components/button';
|
||||
import Avatar from '@/components/avatar';
|
||||
import Profile from '@/features/tournaments/components/profile';
|
||||
import { z } from "zod";
|
||||
|
||||
const searchSchema = z.object({
|
||||
tab: z.string().optional(),
|
||||
});
|
||||
|
||||
export const Route = createFileRoute('/_authed/tournaments/$tournamentId')({
|
||||
validateSearch: searchSchema,
|
||||
beforeLoad: async ({ context, params }) => {
|
||||
const { queryClient } = context;
|
||||
await queryClient.ensureQueryData(tournamentQueries.details(params.tournamentId))
|
||||
|
||||
Reference in New Issue
Block a user