mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34: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:
@@ -174,21 +174,19 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
|
||||
},
|
||||
});
|
||||
toggleEditing(false);
|
||||
Toast.success({
|
||||
content: intl.formatMessage(
|
||||
Toast.success(
|
||||
intl.formatMessage(
|
||||
{ id: "toast.updated_entity" },
|
||||
{ entity: intl.formatMessage({ id: "studio" }).toLocaleLowerCase() }
|
||||
),
|
||||
});
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
async function onAutoTag() {
|
||||
if (!studio.id) return;
|
||||
try {
|
||||
await mutateMetadataAutoTag({ studios: [studio.id] });
|
||||
Toast.success({
|
||||
content: intl.formatMessage({ id: "toast.started_auto_tagging" }),
|
||||
});
|
||||
Toast.success(intl.formatMessage({ id: "toast.started_auto_tagging" }));
|
||||
} catch (e) {
|
||||
Toast.error(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user