2024-12-12 21:55:59 +00:00
|
|
|
import { ChallengesPayload, downloadChallenges } from "@/utils/features/challenges/challengesSlice"
|
|
|
|
import { useAppDispatch, useAppSelector } from "./useStore"
|
2024-12-11 16:26:36 +00:00
|
|
|
|
2024-12-13 23:27:30 +00:00
|
|
|
export const useChallenges = () => useAppSelector((state) => state.challenges.challenges)
|
2024-12-12 21:55:59 +00:00
|
|
|
export const useDownloadChallenges = () => {
|
|
|
|
const dispath = useAppDispatch()
|
|
|
|
return (challengesData: ChallengesPayload) => dispath(downloadChallenges(challengesData))
|
|
|
|
}
|