Téléchargmeent des mises à jour de solde
This commit is contained in:
@ -40,6 +40,11 @@ export const useGeolocationMutation = ({ auth, onPostSuccess, onError }: PostPro
|
||||
},
|
||||
networkMode: 'offlineFirst',
|
||||
onSuccess: async (data, location: LocationObject, context: unknown) => {
|
||||
if (data.statusCode) {
|
||||
if (onError)
|
||||
onError({ response: data })
|
||||
return
|
||||
}
|
||||
if (onPostSuccess)
|
||||
onPostSuccess(data, location, context)
|
||||
},
|
||||
|
8
client/hooks/useMoneyUpdates.ts
Normal file
8
client/hooks/useMoneyUpdates.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { useAppDispatch, useAppSelector } from "./useStore"
|
||||
import { downloadMoneyUpdates, MoneyUpdatesPayload } from "@/utils/features/moneyUpdates/moneyUpdatesSlice"
|
||||
|
||||
export const useMoneyUpdates = () => useAppSelector((state) => state.moneyUpdates.moneyUpdates)
|
||||
export const useDownloadMoneyUpdates = () => {
|
||||
const dispath = useAppDispatch()
|
||||
return (moneyUpdatesData: MoneyUpdatesPayload) => dispath(downloadMoneyUpdates(moneyUpdatesData))
|
||||
}
|
Reference in New Issue
Block a user