mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-09-21 15:24:51 +00:00
Abstract areas
This commit is contained in:
@@ -13,11 +13,12 @@ import {
|
||||
defaultTableTheme,
|
||||
State,
|
||||
} from "../data/data";
|
||||
import { AreaContext, StateContext, TabContext } from "../pages/Editor";
|
||||
import { StateContext, TabContext } from "../pages/Editor";
|
||||
import useLayout from "../hooks/useLayout";
|
||||
import useSettings from "../hooks/useSettings";
|
||||
import useUndoRedo from "../hooks/useUndoRedo";
|
||||
import useSelect from "../hooks/useSelect";
|
||||
import useAreas from "../hooks/useAreas";
|
||||
|
||||
export default function Area(props) {
|
||||
const [hovered, setHovered] = useState(false);
|
||||
@@ -26,7 +27,7 @@ export default function Area(props) {
|
||||
const { layout } = useLayout();
|
||||
const { settings } = useSettings();
|
||||
const { tab, setTab } = useContext(TabContext);
|
||||
const { updateArea, deleteArea } = useContext(AreaContext);
|
||||
const { updateArea, deleteArea } = useAreas();
|
||||
const { setUndoStack, setRedoStack } = useUndoRedo();
|
||||
const { selectedElement, setSelectedElement } = useSelect();
|
||||
|
||||
|
Reference in New Issue
Block a user