Rename TablesContext to DiagramContext

This commit is contained in:
1ilit
2024-07-04 23:18:20 +03:00
parent 3b1af3772e
commit 9b606114df
24 changed files with 52 additions and 52 deletions
@@ -6,9 +6,9 @@ import useSelect from "../hooks/useSelect";
import { Toast } from "@douyinfe/semi-ui";
import { useTranslation } from "react-i18next";
export const TablesContext = createContext(null);
export const DiagramContext = createContext(null);
export default function TablesContextProvider({ children }) {
export default function DiagramContextProvider({ children }) {
const { t } = useTranslation();
const [database, setDatabase] = useState(DB.GENERIC);
const [tables, setTables] = useState([]);
@@ -249,7 +249,7 @@ export default function TablesContextProvider({ children }) {
};
return (
<TablesContext.Provider
<DiagramContext.Provider
value={{
tables,
setTables,
@@ -267,6 +267,6 @@ export default function TablesContextProvider({ children }) {
}}
>
{children}
</TablesContext.Provider>
</DiagramContext.Provider>
);
}