mirror of
https://github.com/drawdb-io/drawdb.git
synced 2026-06-03 02:01:39 +08:00
Abstract tables, undo/redo, selected element
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
import { useContext } from "react";
|
||||
import { SelectContext } from "../context/SelectContext";
|
||||
|
||||
export default function useSelect() {
|
||||
return useContext(SelectContext);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { useContext } from "react";
|
||||
import { TablesContext } from "../context/TablesContext";
|
||||
|
||||
export default function useTables() {
|
||||
return useContext(TablesContext);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { useContext } from "react";
|
||||
import { UndoRedoContext } from "../context/UndoRedoContext";
|
||||
|
||||
export default function useUndoRedo() {
|
||||
return useContext(UndoRedoContext);
|
||||
}
|
||||
Reference in New Issue
Block a user