mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
Hotfix removed UrlSync (#4685)
Co-authored-by: Connor Yoh <[email protected]>
This commit is contained in:
@@ -9,6 +9,7 @@ import { PageEditorFunctions } from '../types/pageEditor';
|
|||||||
import { ToolRegistryEntry, ToolRegistry } from '../data/toolsTaxonomy';
|
import { ToolRegistryEntry, ToolRegistry } from '../data/toolsTaxonomy';
|
||||||
import { useNavigationActions, useNavigationState } from './NavigationContext';
|
import { useNavigationActions, useNavigationState } from './NavigationContext';
|
||||||
import { ToolId, isValidToolId } from '../types/toolId';
|
import { ToolId, isValidToolId } from '../types/toolId';
|
||||||
|
import { useNavigationUrlSync } from '../hooks/useUrlSync';
|
||||||
import { getDefaultWorkbench } from '../types/workbench';
|
import { getDefaultWorkbench } from '../types/workbench';
|
||||||
import { filterToolRegistryByQuery } from '../utils/toolSearch';
|
import { filterToolRegistryByQuery } from '../utils/toolSearch';
|
||||||
import { useToolHistory } from '../hooks/tools/useUserToolActivity';
|
import { useToolHistory } from '../hooks/tools/useUserToolActivity';
|
||||||
@@ -222,6 +223,14 @@ export function ToolWorkflowProvider({ children }: ToolWorkflowProviderProps) {
|
|||||||
[state.sidebarsVisible, state.readerMode, state.leftPanelView]
|
[state.sidebarsVisible, state.readerMode, state.leftPanelView]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
useNavigationUrlSync(
|
||||||
|
navigationState.selectedTool,
|
||||||
|
handleToolSelect,
|
||||||
|
handleBackToTools,
|
||||||
|
toolRegistry as ToolRegistry,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
// Properly memoized context value
|
// Properly memoized context value
|
||||||
const contextValue = useMemo((): ToolWorkflowContextValue => ({
|
const contextValue = useMemo((): ToolWorkflowContextValue => ({
|
||||||
// State
|
// State
|
||||||
|
|||||||
Reference in New Issue
Block a user