Récupération de défis et tirage d'un nouveau défi via des boutons
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
import { useAppSelector } from "./useStore"
|
||||
import { ChallengesPayload, downloadChallenges } from "@/utils/features/challenges/challengesSlice"
|
||||
import { useAppDispatch, useAppSelector } from "./useStore"
|
||||
|
||||
export const useChallenges = () => useAppSelector((state) => state.challenges)
|
||||
export const useDownloadChallenges = () => {
|
||||
const dispath = useAppDispatch()
|
||||
return (challengesData: ChallengesPayload) => dispath(downloadChallenges(challengesData))
|
||||
}
|
||||
|
Reference in New Issue
Block a user