import { ChallengesPayload, downloadChallenges } from "@/utils/features/challenges/challengesSlice" import { useAppDispatch, useAppSelector } from "./useStore" export const useChallenges = () => useAppSelector((state) => state.challenges.challenges) export const useDownloadChallenges = () => { const dispath = useAppDispatch() return (challengesData: ChallengesPayload) => dispath(downloadChallenges(challengesData)) }