Catch Blocks

This commit is contained in:
PxlLoewe
2026-02-01 00:01:06 +01:00
parent 829d6d8cde
commit a60cd67c44
5 changed files with 92 additions and 65 deletions

View File

@@ -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)",