mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* feat(companion): add configurable landing page feature - Add useUserPreferences hook for persistent storage of landing page preference - Add LandingPagePicker component for both iOS and Android/web platforms - Update tabs index to redirect based on user preference - Update bookings index to accept initial filter from URL params - Add App Settings section in More screen with landing page selector - Clear user preferences on logout for fresh state * fix(companion): remove try-finally for React Compiler compatibility * fix(companion): use router.replace for dynamic landing page redirect Replace Redirect component with router.replace() to fix TypeScript strict typing issue with expo-router's Href type for dynamic routes. * fix(companion): use literal route strings for TypeScript strict typing Use switch statement with literal route strings instead of dynamic string variable to satisfy expo-router's strict Href type checking. * working fix * better css
89 lines
2.1 KiB
TypeScript
89 lines
2.1 KiB
TypeScript
/**
|
|
* Query Hooks Index
|
|
*
|
|
* Central export point for all React Query hooks.
|
|
* Import hooks from this file for clean imports:
|
|
*
|
|
* @example
|
|
* ```tsx
|
|
* import { useBookings, useEventTypes, useSchedules } from '../hooks';
|
|
* ```
|
|
*/
|
|
|
|
// Re-export query keys for advanced use cases
|
|
export { queryKeys } from "@/config/cache.config";
|
|
// Re-export query context utilities
|
|
export { useQueryContext } from "@/contexts/QueryContext";
|
|
// UI State Management hooks
|
|
export {
|
|
type BookingFilter,
|
|
type BookingFilterOption,
|
|
useActiveBookingFilter,
|
|
} from "./useActiveBookingFilter";
|
|
export { useBookingActionModals } from "./useBookingActionModals";
|
|
export { useBookingActions } from "./useBookingActions";
|
|
// Bookings hooks
|
|
export {
|
|
type Booking,
|
|
type BookingFilters,
|
|
useBookingByUid,
|
|
useBookings,
|
|
useCancelBooking,
|
|
useConfirmBooking,
|
|
useDeclineBooking,
|
|
useInvalidateBookings,
|
|
usePrefetchBookings,
|
|
useRescheduleBooking,
|
|
} from "./useBookings";
|
|
// Event Types hooks
|
|
export {
|
|
type CreateEventTypeInput,
|
|
type EventType,
|
|
useCreateEventType,
|
|
useDeleteEventType,
|
|
useDuplicateEventType,
|
|
useEventTypeById,
|
|
useEventTypes,
|
|
useInvalidateEventTypes,
|
|
usePrefetchEventTypes,
|
|
useUpdateEventType,
|
|
} from "./useEventTypes";
|
|
// Schedules (Availability) hooks
|
|
export {
|
|
type CreateScheduleInput,
|
|
type Schedule,
|
|
type UpdateScheduleInput,
|
|
useCreateSchedule,
|
|
useDeleteSchedule,
|
|
useDuplicateSchedule,
|
|
useInvalidateSchedules,
|
|
usePrefetchSchedules,
|
|
useScheduleById,
|
|
useSchedules,
|
|
useSetScheduleAsDefault,
|
|
useUpdateSchedule,
|
|
} from "./useSchedules";
|
|
// Toast hook
|
|
export { type ToastState, type ToastType, useToast } from "./useToast";
|
|
// User Preferences hooks
|
|
export {
|
|
getRouteFromPreference,
|
|
LANDING_PAGE_OPTIONS,
|
|
type LandingPage,
|
|
type LandingPageOption,
|
|
type UserPreferences,
|
|
useUserPreferences,
|
|
} from "./useUserPreferences";
|
|
// User Profile hooks
|
|
export {
|
|
type UpdateUserProfileInput,
|
|
type UserProfile,
|
|
useInvalidateUserProfile,
|
|
usePrefetchUserProfile,
|
|
useUpdateUserProfile,
|
|
useUsername,
|
|
useUserProfile,
|
|
} from "./useUserProfile";
|
|
// Widget sync hook
|
|
export { useWidgetSync } from "./useWidgetSync";
|