i18n
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import { useLingui } from "@lingui/react/macro";
|
||||
import {
|
||||
useServerMutation,
|
||||
useServerSuspenseQuery,
|
||||
@@ -43,10 +44,11 @@ export const usePlayerPrediction = (tournamentId: string, playerId: string) =>
|
||||
|
||||
export const useSubmitPrediction = (tournamentId: string) => {
|
||||
const queryClient = useQueryClient();
|
||||
const { t } = useLingui();
|
||||
|
||||
return useServerMutation({
|
||||
mutationFn: submitPrediction,
|
||||
successMessage: "Prediction saved!",
|
||||
successMessage: t`Prediction saved!`,
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: predictionKeys.tournament(tournamentId),
|
||||
|
||||
Reference in New Issue
Block a user