several changes
This commit is contained in:
12
src/features/tournaments/hooks/use-update-tournament.ts
Normal file
12
src/features/tournaments/hooks/use-update-tournament.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import { updateTournament } from "@/features/tournaments/server";
|
||||
import { TournamentFormInput } from "@/features/tournaments/types";
|
||||
|
||||
const useUpdateTournament = (tournamentId: string) => {
|
||||
return useMutation({
|
||||
mutationFn: (data: Partial<TournamentFormInput>) =>
|
||||
updateTournament({ data: { id: tournamentId, updates: data } }),
|
||||
});
|
||||
};
|
||||
|
||||
export default useUpdateTournament;
|
||||
Reference in New Issue
Block a user