fix(timetable): use fetchTimetables instead of fetchMyTimetables — service stub unimplemented
Some checks failed
app-ci-deploy / test-build-deploy (push) Has been cancelled

timetableOnlyService.getMyTimetables is referenced but never defined; calling it throws
'is not a function' at runtime. fetchTimetables calls the implemented listTimetables endpoint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
CC Worker 2026-06-02 22:15:58 +00:00
parent 5869c741d7
commit 0dd18c4fd4

View File

@ -5,11 +5,11 @@ import useTimetableStore from '../../stores/timetableStore';
import { format, parseISO } from 'date-fns';
const TimetableListPage: React.FC = () => {
const { timetables, timetablesLoading, timetablesError, fetchMyTimetables } = useTimetableStore();
const { timetables, timetablesLoading, timetablesError, fetchTimetables } = useTimetableStore();
useEffect(() => {
fetchMyTimetables();
}, [fetchMyTimetables]);
fetchTimetables();
}, [fetchTimetables]);
if (timetablesLoading) {
return (
@ -26,7 +26,7 @@ const TimetableListPage: React.FC = () => {
<h2 className="text-lg font-semibold text-red-800 mb-2">Error Loading Timetables</h2>
<p className="text-red-600">{timetablesError}</p>
<button
onClick={() => fetchMyTimetables()}
onClick={() => fetchTimetables()}
className="mt-4 text-sm font-medium text-blue-600 hover:underline"
>
Retry