// [REQ T2]  Custom hooks – useReservations enkapsuluje useQuery dla admina
// [REQ D7]  React Query – useQuery z kluczem ['reservations'] i automatycznym odświeżaniem
import { useQuery } from '@tanstack/react-query';
import { getAllReservations } from '../api/reservations';

export const useReservations = () =>
  useQuery({
    queryKey: ['reservations'],
    queryFn: getAllReservations,
  });
