Prettier format pending files

This commit is contained in:
Builder.io 2025-11-10 00:25:57 +00:00
parent 518b59ce7e
commit d3f8fad03e

View file

@ -698,21 +698,24 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
if (provider === "discord") {
try {
const apiBase =
(import.meta as any)?.env?.VITE_API_BASE ||
window.location.origin;
(import.meta as any)?.env?.VITE_API_BASE || window.location.origin;
const u = new URL("/api/discord/oauth/start", apiBase);
u.searchParams.set("state", encodeURIComponent(JSON.stringify({
action: "link",
redirectTo: `${window.location.origin}/dashboard?tab=connections`,
})));
u.searchParams.set(
"state",
encodeURIComponent(
JSON.stringify({
action: "link",
redirectTo: `${window.location.origin}/dashboard?tab=connections`,
}),
),
);
window.location.href = u.toString();
return;
} catch (error: any) {
console.error("Discord link error:", error);
aethexToast.error({
title: "Link failed",
description:
error?.message || "Unable to link Discord right now.",
description: error?.message || "Unable to link Discord right now.",
});
}
}