({
});
const onSelectionChange = useCallback(
- (key: string | number) => {
+ (key: string | number | null) => {
const option = options.find((option) => getOptionKey(option) === key);
if (option) {
onSelect?.(option);
diff --git a/front/src/hooks/spectrogram/useSpectrogram.ts b/front/src/hooks/spectrogram/useSpectrogram.ts
index 3c626cef..d4ace430 100644
--- a/front/src/hooks/spectrogram/useSpectrogram.ts
+++ b/front/src/hooks/spectrogram/useSpectrogram.ts
@@ -47,8 +47,8 @@ export type SpectrogramState = {
export type SpectrogramControls = {
reset: () => void;
zoom: (window: SpectrogramWindow) => void;
- scale: ({ time = 1, freq = 1 }: { time?: number; freq?: number }) => void;
- shift({ time = 0, freq = 0 }: { time?: number; freq?: number }): void;
+ scale: ({ time , freq }: { time?: number; freq?: number }) => void;
+ shift({ time , freq }: { time?: number; freq?: number }): void;
centerOn: ({ time, freq }: { time?: number; freq?: number }) => void;
setParameters: (parameters: SpectrogramParameters) => void;
resetParameters: () => void;