chore: update router

This commit is contained in:
Steven
2022-09-15 22:00:40 +08:00
parent 874b7768c8
commit b5d1ed0ee7
11 changed files with 59 additions and 55 deletions

View File

@@ -90,16 +90,16 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
} else {
await shortcutService.createShortcut(state.shortcutCreate);
}
destroy();
} catch (error: any) {
console.error(error);
toastHelper.error(error.response.data.message);
toastHelper.error(error.response.data.error || error.response.data.message);
}
destroy();
};
return (
<>
<div className="max-w-full w-80 flex flex-row justify-between items-center mb-4">
<div className="max-w-full w-80 sm:w-96 flex flex-row justify-between items-center mb-4">
<p className="text-base">{shortcutId ? "Edit Shortcut" : "Create Shortcut"}</p>
<button className="rounded p-1 hover:bg-gray-100" onClick={destroy}>
<Icon.X className="w-5 h-auto text-gray-600" />