chore: Improve toasts

This commit is contained in:
Tom Moor
2021-01-02 21:47:02 -08:00
parent bb81aa0065
commit 9df02d6fd4
32 changed files with 101 additions and 59 deletions

View File

@@ -47,9 +47,11 @@ class CollectionEdit extends React.Component<Props> {
sort: this.sort,
});
this.props.onSubmit();
this.props.ui.showToast(t("The collection was updated"));
this.props.ui.showToast(t("The collection was updated"), {
type: "success",
});
} catch (err) {
this.props.ui.showToast(err.message);
this.props.ui.showToast(err.message, { type: "error" });
} finally {
this.isSaving = false;
}