mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-09-22 07:54:49 +00:00
Abstract SettingsContext out
This commit is contained in:
@@ -16,19 +16,19 @@ import {
|
||||
import {
|
||||
AreaContext,
|
||||
SelectContext,
|
||||
SettingsContext,
|
||||
StateContext,
|
||||
TabContext,
|
||||
UndoRedoContext,
|
||||
} from "../pages/Editor";
|
||||
import useLayout from "../hooks/useLayout";
|
||||
import useSettings from "../hooks/useSettings";
|
||||
|
||||
export default function Area(props) {
|
||||
const [hovered, setHovered] = useState(false);
|
||||
const [editField, setEditField] = useState({});
|
||||
const { setState } = useContext(StateContext);
|
||||
const {layout} = useLayout();
|
||||
const { settings } = useContext(SettingsContext);
|
||||
const { layout } = useLayout();
|
||||
const { settings } = useSettings();
|
||||
const { tab, setTab } = useContext(TabContext);
|
||||
const { updateArea, deleteArea } = useContext(AreaContext);
|
||||
const { setUndoStack, setRedoStack } = useContext(UndoRedoContext);
|
||||
|
Reference in New Issue
Block a user