mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-03 17:52:30 +02:00
Change to Viewer mode when Read tool selected (#4317)
# Description of Changes Change it so that when you select the Read tool, the Viewer is automatically selected.
This commit is contained in:
parent
cf771075f4
commit
7c9769f5b9
@ -138,8 +138,12 @@ export function ToolWorkflowProvider({ children }: ToolWorkflowProviderProps) {
|
||||
}, []);
|
||||
|
||||
const setReaderMode = useCallback((mode: boolean) => {
|
||||
if (mode) {
|
||||
actions.setWorkbench('viewer');
|
||||
actions.setSelectedTool('read');
|
||||
}
|
||||
dispatch({ type: 'SET_READER_MODE', payload: mode });
|
||||
}, []);
|
||||
}, [actions]);
|
||||
|
||||
const setPreviewFile = useCallback((file: File | null) => {
|
||||
dispatch({ type: 'SET_PREVIEW_FILE', payload: file });
|
||||
|
Loading…
Reference in New Issue
Block a user