mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-09-18 01:19:24 +00:00
Merge branch 'V2' into fixErrorInV2
This commit is contained in:
commit
b9068b1955
@ -138,8 +138,12 @@ export function ToolWorkflowProvider({ children }: ToolWorkflowProviderProps) {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const setReaderMode = useCallback((mode: boolean) => {
|
const setReaderMode = useCallback((mode: boolean) => {
|
||||||
|
if (mode) {
|
||||||
|
actions.setWorkbench('viewer');
|
||||||
|
actions.setSelectedTool('read');
|
||||||
|
}
|
||||||
dispatch({ type: 'SET_READER_MODE', payload: mode });
|
dispatch({ type: 'SET_READER_MODE', payload: mode });
|
||||||
}, []);
|
}, [actions]);
|
||||||
|
|
||||||
const setPreviewFile = useCallback((file: File | null) => {
|
const setPreviewFile = useCallback((file: File | null) => {
|
||||||
dispatch({ type: 'SET_PREVIEW_FILE', payload: file });
|
dispatch({ type: 'SET_PREVIEW_FILE', payload: file });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user