regionals enrollments

This commit is contained in:
yohlo
2026-02-21 23:12:21 -06:00
parent 7f60b4d200
commit b9e16e2b64
27 changed files with 1212 additions and 83 deletions

View File

@@ -3,7 +3,7 @@ import { useServerMutation } from "@/lib/tanstack-query/hooks";
import { enrollFreeAgent } from "@/features/tournaments/server";
import { tournamentKeys } from "../queries";
const useEnrollFreeAgent = () => {
const useEnrollFreeAgent = (isRegional?: boolean) => {
const queryClient = useQueryClient();
return useServerMutation({
@@ -13,7 +13,7 @@ const useEnrollFreeAgent = () => {
onSuccess: (data, { tournamentId }) => {
queryClient.invalidateQueries({ queryKey: tournamentKeys.free_agents(tournamentId) });
},
successMessage: 'You\'ve been added as a free agent!',
successMessage: isRegional ? "You've enrolled in regionals!" : "You've been added as a free agent!",
});
};