mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-09-19 22:14:50 +00:00
Abstract tables, undo/redo, selected element
This commit is contained in:
6
src/hooks/useSelect.js
Normal file
6
src/hooks/useSelect.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { useContext } from "react";
|
||||
import { SelectContext } from "../context/SelectContext";
|
||||
|
||||
export default function useSelect() {
|
||||
return useContext(SelectContext);
|
||||
}
|
6
src/hooks/useTables.js
Normal file
6
src/hooks/useTables.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { useContext } from "react";
|
||||
import { TablesContext } from "../context/TablesContext";
|
||||
|
||||
export default function useTables() {
|
||||
return useContext(TablesContext);
|
||||
}
|
6
src/hooks/useUndoRedo.js
Normal file
6
src/hooks/useUndoRedo.js
Normal file
@@ -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