Catch Blocks
This commit is contained in:
@@ -663,10 +663,15 @@ export const AdminForm = ({
|
||||
>
|
||||
<Button
|
||||
onClick={async () => {
|
||||
await setStandardName({
|
||||
const res = (await setStandardName({
|
||||
memberId: discordAccount.discordId,
|
||||
userId: user.id,
|
||||
});
|
||||
})) as unknown as { error?: string };
|
||||
console.log(res);
|
||||
if (res?.error) {
|
||||
toast.error(res.error);
|
||||
return;
|
||||
}
|
||||
toast.success("Standard Name wurde gesetzt!", {
|
||||
style: {
|
||||
background: "var(--color-base-100)",
|
||||
|
||||
Reference in New Issue
Block a user