mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39: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
25 lines
543 B
TypeScript
25 lines
543 B
TypeScript
import { AudioWaveform } from "../../lib/api-types";
|
|
import { useTranscriptWaveform } from "../../lib/api-hooks";
|
|
|
|
type AudioWaveFormResponse = {
|
|
waveform: AudioWaveform | null;
|
|
loading: boolean;
|
|
error: Error | null;
|
|
};
|
|
|
|
const useWaveform = (id: string, skip: boolean): AudioWaveFormResponse => {
|
|
const {
|
|
data: waveform,
|
|
isLoading: loading,
|
|
error,
|
|
} = useTranscriptWaveform(skip ? null : id);
|
|
|
|
return {
|
|
waveform: waveform || null,
|
|
loading,
|
|
error: error as Error | null,
|
|
};
|
|
};
|
|
|
|
export default useWaveform;
|