Files
reflector/www/app/(app)/transcripts/useWaveform.ts
Mathieu Virbel d479d9d4e6 refactor: rename api-hooks.ts to apiHooks.ts for consistency
- 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
2025-08-29 16:44:21 -06:00

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;