mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Toast fixes/refactoring (#4289)
* Memoize Toast functions * Rename Toast.success to Toast.toast, add new Toast.success * Disable prefer-destructuring on AssignmentExpression
This commit is contained in:
@@ -22,16 +22,16 @@ function useCreateObject<T>(
|
||||
try {
|
||||
await createFunc(o);
|
||||
|
||||
Toast.success({
|
||||
content: intl.formatMessage(
|
||||
Toast.success(
|
||||
intl.formatMessage(
|
||||
{ id: "toast.created_entity" },
|
||||
{
|
||||
entity: intl
|
||||
.formatMessage({ id: entityTypeID })
|
||||
.toLocaleLowerCase(),
|
||||
}
|
||||
),
|
||||
});
|
||||
)
|
||||
);
|
||||
} catch (e) {
|
||||
Toast.error(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user