-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Location: frontend/lib/react-query/hooks/bookings/
Description
The member-facing bookings page and booking creation flow both need React Query hooks to communicate with the backend. This issue covers the two hooks a regular member needs: fetching their own bookings and creating a new one.
The project uses a shared apiClient at frontend/lib/apiClient.ts and centralised query keys in frontend/lib/react-query/keys/queryKeys.ts. Add any new keys there.
Acceptance Criteria
-
useGetMyBookings.ts— wrapsGET /bookingswithpage,limit, and optionalstatusfilter params. Returns{ data: Booking[], meta: { total, page, limit, totalPages } } -
useCreateBooking.ts— wrapsPOST /bookings. Accepts the booking payload as the mutation variable. On success, invalidates the member bookings query so the list refreshes automatically - Both files are marked
"use client"and placed underfrontend/lib/react-query/hooks/bookings/ - Query keys for member bookings are added to
frontend/lib/react-query/keys/queryKeys.ts -
npx tsc --noEmitpasses with no errors
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers