refactor: optimize imports (#1822)

This commit is contained in:
Manuel
2024-01-15 17:16:13 +01:00
committed by GitHub
parent c701f723cf
commit 5bae5bf04d
33 changed files with 49 additions and 196 deletions

View File

@@ -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,

View File

@@ -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);
};

View File

@@ -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);