Skip to content

Commit

Permalink
fix can not create database again after creating database failed (#558)
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <[email protected]>
  • Loading branch information
shanghaikid authored Jun 27, 2024
1 parent 5aec05a commit 2dad3a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/pages/dialogs/CreateDatabaseDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ const CreateDatabaseDialog: FC<CreateDatabaseProps> = ({ onCreate }) => {

const handleCreate = async () => {
setLoading(true);
await createDatabase(form);
await createDatabase(form).finally(() => {
setLoading(false);
});
openSnackBar(successTrans('create', { name: dbTrans('database') }));
setLoading(false);

Expand Down

0 comments on commit 2dad3a5

Please sign in to comment.