Files
reflector/www/app/(app)/rooms/useRoomList.tsx
Mathieu Virbel 68c161ee7e fix: resolve import errors and add missing api hooks
- Create constants.ts for RECORD_A_MEETING_URL
- Add api-types.ts for backward compatible type exports
- Update all imports from deleted api folder to new locations
- Add missing React Query hooks for rooms and zulip operations
- Create useApi compatibility layer for unmigrated components
2025-08-29 09:36:55 -06:00

25 lines
607 B
TypeScript

import { useRoomsList } from "../../lib/api-hooks";
import { Page_Room_ } from "../../lib/api-types";
import { PaginationPage } from "../browse/_components/Pagination";
type RoomList = {
response: Page_Room_ | null;
loading: boolean;
error: Error | null;
refetch: () => void;
};
// Wrapper to maintain backward compatibility
const useRoomList = (page: PaginationPage): RoomList => {
const { data, isLoading, error, refetch } = useRoomsList(page);
return {
response: data || null,
loading: isLoading,
error: error as Error | null,
refetch,
};
};
export default useRoomList;