crashing from wav file size i think
This commit is contained in:
@ -55,6 +55,8 @@ interface EditorActions {
|
||||
getWordAtTime: (time: number) => number;
|
||||
loadProject: (projectData: any) => void;
|
||||
reset: () => void;
|
||||
pauseUndo: () => void;
|
||||
resumeUndo: () => void;
|
||||
}
|
||||
|
||||
const initialState: EditorState = {
|
||||
@ -327,6 +329,22 @@ export const useEditorStore = create<EditorState & EditorActions>()(
|
||||
},
|
||||
|
||||
reset: () => set(initialState),
|
||||
|
||||
pauseUndo: () => {
|
||||
// Access the temporal store through the useEditorStore
|
||||
const temporalStore = (useEditorStore as any).temporal;
|
||||
if (temporalStore) {
|
||||
temporalStore.getState().pause();
|
||||
}
|
||||
},
|
||||
|
||||
resumeUndo: () => {
|
||||
// Access the temporal store through the useEditorStore
|
||||
const temporalStore = (useEditorStore as any).temporal;
|
||||
if (temporalStore) {
|
||||
temporalStore.getState().resume();
|
||||
}
|
||||
},
|
||||
}),
|
||||
{ limit: 100 },
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user