diff --git a/frontend/src/components/Schedule/Timeline.tsx b/frontend/src/components/Schedule/Timeline.tsx index 3aabc5e..83a3720 100644 --- a/frontend/src/components/Schedule/Timeline.tsx +++ b/frontend/src/components/Schedule/Timeline.tsx @@ -30,7 +30,7 @@ import { DEFAULT_PIXELS_PER_HOUR, SNAP_MINUTES } from '../../lib/timelineUtils'; import { useQuery } from '@tanstack/react-query'; import { adaptResources, adaptEvents, adaptPending } from '../../lib/uiAdapter'; -import axios from 'axios'; +import apiClient from '../../api/client'; type ViewMode = 'day' | 'week' | 'month'; @@ -39,7 +39,7 @@ export const Timeline: React.FC = () => { const { data: resources = [] } = useQuery({ queryKey: ['resources'], queryFn: async () => { - const response = await axios.get('http://api.lvh.me:8000/resources/'); + const response = await apiClient.get('/resources/'); return adaptResources(response.data); } }); @@ -47,7 +47,7 @@ export const Timeline: React.FC = () => { const { data: backendAppointments = [] } = useQuery({ // Renamed to backendAppointments to avoid conflict with localEvents queryKey: ['appointments'], queryFn: async () => { - const response = await axios.get('http://api.lvh.me:8000/appointments/'); + const response = await apiClient.get('/appointments/'); return response.data; // Still return raw data, adapt in useEffect } });