move 'env' from state to context
This commit is contained in:
parent
9ef160aeb7
commit
f09261df93
13 changed files with 178 additions and 148 deletions
|
|
@ -1,3 +1,9 @@
|
|||
import { createContext } from "react";
|
||||
|
||||
export const CommandContext = createContext<{[key:string]: () => void}>({});
|
||||
interface GlobalActions {
|
||||
undo: () => void;
|
||||
redo: () => void;
|
||||
doHighlight: {[key:string]: () => void};
|
||||
}
|
||||
|
||||
export const CommandContext = createContext<GlobalActions|null>(null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue