mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-22 21:29:05 +00:00
- 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
25 lines
607 B
TypeScript
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;
|