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)) }