fix: stale appState of MainMenu defaultItems rendered from Actions (#6074)

This commit is contained in:
David Luzar
2023-01-06 14:32:55 +01:00
committed by GitHub
parent 9803a85381
commit 40d53d9231
26 changed files with 463 additions and 431 deletions

View File

@@ -312,9 +312,9 @@ const ExcalidrawSetAppStateContext = React.createContext<
>(() => {});
ExcalidrawSetAppStateContext.displayName = "ExcalidrawSetAppStateContext";
const ExcalidrawActionManagerContext = React.createContext<
ActionManager | { renderAction: ActionManager["renderAction"] }
>({ renderAction: () => null });
const ExcalidrawActionManagerContext = React.createContext<ActionManager>(
null!,
);
ExcalidrawActionManagerContext.displayName = "ExcalidrawActionManagerContext";
export const useExcalidrawElements = () =>