mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
- Migrated all components from useApi compatibility layer to direct React Query hooks - Added new hooks for participant operations, room meetings, and speaker operations - Updated all imports from old api module to api-types - Fixed TypeScript types and API endpoint signatures - Removed deprecated useApi.ts compatibility layer - Fixed SourceKind enum values to match OpenAPI spec - Added @ts-ignore for Zulip endpoints not in OpenAPI spec yet - Fixed all compilation errors and type issues
21 lines
485 B
TypeScript
21 lines
485 B
TypeScript
import { useTranscriptTopics } from "../../lib/api-hooks";
|
|
import { GetTranscriptTopic } from "../../lib/api-types";
|
|
|
|
type TranscriptTopics = {
|
|
topics: GetTranscriptTopic[] | null;
|
|
loading: boolean;
|
|
error: Error | null;
|
|
};
|
|
|
|
const useTopics = (id: string): TranscriptTopics => {
|
|
const { data: topics, isLoading: loading, error } = useTranscriptTopics(id);
|
|
|
|
return {
|
|
topics: topics || null,
|
|
loading,
|
|
error: error as Error | null,
|
|
};
|
|
};
|
|
|
|
export default useTopics;
|