Compare commits

..

No commits in common. "0eef4ed4f68fe6eb9a88309bf066621241feb865" and "9b6c1f07f907fd0b0ebeb8df60f3d4894dc7ef64" have entirely different histories.

@ -83,20 +83,15 @@ export default function CodeDialog({
});
async function onSubmit(data: z.infer<typeof FormSchema>) {
const { code } = data;
toast.promise(
new Promise<void>((g, b) => {
linkMCAccount(code).then((c) => {
console.log(c);
if (c === undefined) {
const playerName = await toast.promise(
new Promise(async (g, b) => {
const response = await linkMCAccount(code);
if (response == undefined) {
b();
return;
}
g();
setName(c);
setDialog(true);
setLinked(true);
});
g(response);
}),
{
loading: "Linking account..",
@ -104,6 +99,9 @@ export default function CodeDialog({
success: "Linked account!",
}
);
setName(playerName as string);
setDialog(true);
setLinked(true);
}
return (
@ -158,9 +156,9 @@ export default function CodeDialog({
<DialogTitle>You have linked your account!</DialogTitle>
<Confetti className="absolute left-0 top-0 z-0 size-full" />
<DialogDescription>
You've successfully linked your account, {name}! Enjoy adding
banners, custom accent colors, and other things to your server
page.
You've successfully linked your account, <strong>{name}</strong>!
Enjoy adding banners, custom accent colors, and other things to
your server page.
</DialogDescription>
</DialogHeader>
</DialogContent>