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
27 lines
606 B
TypeScript
27 lines
606 B
TypeScript
import type { components } from "../../reflector-api";
|
|
import { useTranscriptWaveform } from "../../lib/apiHooks";
|
|
|
|
type AudioWaveform = components["schemas"]["AudioWaveform"];
|
|
|
|
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;
|