forked from administration/panel
fix: clear alert message after sending
parent
1f116d4e37
commit
78632d4a48
|
@ -316,7 +316,10 @@ export function UserActions({ user, bot }: { user: User; bot?: Bot }) {
|
|||
if (!alertMessage.current) return;
|
||||
|
||||
sendAlert(user._id, alertMessage.current)
|
||||
.then(() => toast({ title: "Sent Alert" }))
|
||||
.then(() => {
|
||||
toast({ title: "Sent Alert" });
|
||||
alertMessage.current = "";
|
||||
})
|
||||
.catch((err) =>
|
||||
toast({
|
||||
title: "Failed to send alert!",
|
||||
|
|
Loading…
Reference in New Issue