fix(notifications): name the entity in action toasts
Eight confirmations stated a bare fact without saying what they acted on. Pass the entity through the mutation variables and interpolate it: channel unsubscribe/reset name the channel, whitelist/demo-whitelist adds name the email, tag delete names the tag, and playlist revert/push name the playlist. EN/HU/DE.
This commit is contained in:
parent
557f2cef9c
commit
6c4c33f956
16 changed files with 45 additions and 43 deletions
|
|
@ -242,10 +242,10 @@ function AdminInvites() {
|
|||
});
|
||||
const add = useMutation({
|
||||
mutationFn: (email: string) => api.addInvite(email),
|
||||
onSuccess: () => {
|
||||
onSuccess: (_d, email) => {
|
||||
setNewEmail("");
|
||||
refresh();
|
||||
notify({ level: "success", message: t("settings.invites.addedToWhitelist") });
|
||||
notify({ level: "success", message: t("settings.invites.addedToWhitelist", { email }) });
|
||||
},
|
||||
onError: () => notify({ level: "error", message: t("settings.invites.addFailed") }),
|
||||
});
|
||||
|
|
@ -324,10 +324,10 @@ function AdminDemo() {
|
|||
|
||||
const add = useMutation({
|
||||
mutationFn: (email: string) => api.addDemoWhitelist(email),
|
||||
onSuccess: () => {
|
||||
onSuccess: (_d, email) => {
|
||||
setNewEmail("");
|
||||
qc.invalidateQueries({ queryKey: ["demo-whitelist"] });
|
||||
notify({ level: "success", message: t("settings.demo.added") });
|
||||
notify({ level: "success", message: t("settings.demo.added", { email }) });
|
||||
},
|
||||
onError: () => notify({ level: "error", message: t("settings.demo.addFailed") }),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue