import { downloadTrains, TrainsPayload } from "@/utils/features/train/trainSlice" import { useAppDispatch, useAppSelector } from "./useStore" export const useTrain = () => useAppSelector((state) => state.train) export const useDownloadTrains = () => { const dispath = useAppDispatch() return (trainsData: TrainsPayload) => dispath(downloadTrains(trainsData)) }