mirror of
https://github.com/drawdb-io/drawdb.git
synced 2026-06-01 02:00:44 +08:00
Make variable naming consistent
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { createContext, useState } from "react";
|
||||
import { Action, ObjectType, defaultTableTheme } from "../data/data";
|
||||
import { Action, ObjectType, defaultBlue } from "../data/constants";
|
||||
import useUndoRedo from "../hooks/useUndoRedo";
|
||||
import useTransform from "../hooks/useTransform";
|
||||
import useSelect from "../hooks/useSelect";
|
||||
@@ -29,7 +29,7 @@ export default function AreasContextProvider({ children }) {
|
||||
y: -transform.pan.y,
|
||||
width: 200,
|
||||
height: 200,
|
||||
color: defaultTableTheme,
|
||||
color: defaultBlue,
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createContext, useState } from "react";
|
||||
import useTransform from "../hooks/useTransform";
|
||||
import { Action, ObjectType, defaultNoteTheme } from "../data/data";
|
||||
import { Action, ObjectType, defaultNoteTheme } from "../data/constants";
|
||||
import useUndoRedo from "../hooks/useUndoRedo";
|
||||
import useSelect from "../hooks/useSelect";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createContext, useState } from "react";
|
||||
import { State } from "../data/data";
|
||||
import { State } from "../data/constants";
|
||||
|
||||
export const SaveStateContext = createContext(null);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createContext, useState } from "react";
|
||||
import { ObjectType, Tab } from "../data/data";
|
||||
import { ObjectType, Tab } from "../data/constants";
|
||||
|
||||
export const SelectContext = createContext(null);
|
||||
|
||||
@@ -9,7 +9,7 @@ export default function SelectContextProvider({ children }) {
|
||||
id: -1,
|
||||
openDialogue: false,
|
||||
openCollapse: false,
|
||||
currentTab: Tab.tables,
|
||||
currentTab: Tab.TABLES,
|
||||
open: false, // open popover or sidesheet when sidebar is disabled
|
||||
openFromToolbar: false, // this is to handle triggering onClickOutside when sidebar is disabled
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createContext, useState } from "react";
|
||||
import { Action, ObjectType, defaultTableTheme } from "../data/data";
|
||||
import { Action, ObjectType, defaultBlue } from "../data/constants";
|
||||
import useTransform from "../hooks/useTransform";
|
||||
import useUndoRedo from "../hooks/useUndoRedo";
|
||||
import useSelect from "../hooks/useSelect";
|
||||
@@ -44,7 +44,7 @@ export default function TablesContextProvider({ children }) {
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: defaultTableTheme,
|
||||
color: defaultBlue,
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createContext, useState } from "react";
|
||||
import { Action, ObjectType } from "../data/data";
|
||||
import { Action, ObjectType } from "../data/constants";
|
||||
import useUndoRedo from "../hooks/useUndoRedo";
|
||||
|
||||
export const TypesContext = createContext(null);
|
||||
|
||||
Reference in New Issue
Block a user