mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
- Renamed api-hooks.ts to apiHooks.ts to follow camelCase convention - Updated all 21 import statements across the codebase - Maintains consistency with other non-component files (apiClient.tsx, useAuthReady.ts, etc.) - Follows established naming pattern: PascalCase for components, camelCase for utilities/hooks
23 lines
553 B
TypeScript
23 lines
553 B
TypeScript
import { useTranscriptTopics } from "../../lib/apiHooks";
|
|
import type { components } from "../../reflector-api";
|
|
|
|
type GetTranscriptTopic = components["schemas"]["GetTranscriptTopic"];
|
|
|
|
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;
|