move 'env' from state to context

This commit is contained in:
Joeri Exelmans 2025-05-13 14:33:35 +02:00
parent 9ef160aeb7
commit f09261df93
13 changed files with 178 additions and 148 deletions

View file

@ -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);