mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 07:22:53 +00:00
17 lines
539 B
TypeScript
17 lines
539 B
TypeScript
import { useQuery } from '@tanstack/react-query';
|
|
|
|
import { trainSchedulingService } from '@/services/trainScheduling.service';
|
|
import { QUERY_KEYS } from '@/constants/QUERY_KEYS';
|
|
|
|
/**
|
|
* The 21 network stations / yards, sourced from the existing booking
|
|
* reference-data API. Reused as the parent "Facility / Port" for warehouses.
|
|
*/
|
|
export function useStations() {
|
|
return useQuery({
|
|
queryKey: QUERY_KEYS.TRAIN_SCHEDULING.stations(),
|
|
queryFn: () => trainSchedulingService.getStations(),
|
|
staleTime: 5 * 60 * 1000,
|
|
});
|
|
}
|