refactor: optimize imports (#1822)
This commit is contained in:
@@ -29,7 +29,7 @@ export const WidgetElementType = ({ id, image, disabled, widget }: WidgetElement
|
||||
const getLowestWrapper = () => config?.wrappers.sort((a, b) => a.position - b.position)[0];
|
||||
|
||||
const handleAddition = async () => {
|
||||
updateConfig(
|
||||
await updateConfig(
|
||||
configName,
|
||||
(prev) => ({
|
||||
...prev,
|
||||
|
||||
@@ -28,7 +28,7 @@ export const CategoryEditModal = ({
|
||||
});
|
||||
|
||||
const handleSubmit = async (values: FormType) => {
|
||||
innerProps.onSuccess({ ...innerProps.category, name: values.name });
|
||||
await innerProps.onSuccess({ ...innerProps.category, name: values.name });
|
||||
context.closeModal(id);
|
||||
};
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export const useCategoryActions = (configName: string | undefined, category: Cat
|
||||
};
|
||||
|
||||
// Adding category and wrapper and moving other items down
|
||||
updateConfig(
|
||||
await updateConfig(
|
||||
configName,
|
||||
(previous) => {
|
||||
const aboveWrappers = previous.wrappers.filter((x) => x.position <= abovePosition);
|
||||
@@ -87,7 +87,7 @@ export const useCategoryActions = (configName: string | undefined, category: Cat
|
||||
};
|
||||
|
||||
// Adding category and wrapper and moving other items down
|
||||
updateConfig(
|
||||
await updateConfig(
|
||||
configName,
|
||||
(previous) => {
|
||||
const aboveWrappers = previous.wrappers.filter((x) => x.position < belowPosition);
|
||||
|
||||
Reference in New Issue
Block a user