2024-12-12 13:56:17 +00:00
|
|
|
import { downloadTrains, TrainsPayload } from "@/utils/features/train/trainSlice"
|
|
|
|
import { useAppDispatch, useAppSelector } from "./useStore"
|
2024-12-11 16:26:36 +00:00
|
|
|
|
2024-12-13 23:27:30 +00:00
|
|
|
export const useTrain = () => useAppSelector((state) => state.train.trains)
|
2024-12-12 13:56:17 +00:00
|
|
|
export const useDownloadTrains = () => {
|
|
|
|
const dispath = useAppDispatch()
|
|
|
|
return (trainsData: TrainsPayload) => dispath(downloadTrains(trainsData))
|
|
|
|
}
|