Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix: don't call window in ssr

Brad Barbin0ba040f51be8
diff --git a/apps/carbon/app/routes/_public+/confirm-invite.tsx b/apps/carbon/app/routes/_public+/confirm-invite.tsx
index 7cf4b10a63..7feed42ba3 100644
--- a/apps/carbon/app/routes/_public+/confirm-invite.tsx
+++ b/apps/carbon/app/routes/_public+/confirm-invite.tsx
@@ -22,11 +22,9 @@ export default function ConfirmInvite() {
}
const getConfirmationURL = (token: string) => {
- return `${SUPABASE_API_URL}/auth/v1/verify?token=${token}&type=invite&redirect_to=${window.location.origin}/callback`;
+ return `${SUPABASE_API_URL}/auth/v1/verify?token=${token}&type=invite&redirect_to=${window?.location.origin}/callback`;
};
- console.log(getConfirmationURL("xxxx"));
-
return (
<AnimatePresence>
<VStack
diff --git a/apps/carbon/app/routes/_public+/confirm-magic-link.tsx b/apps/carbon/app/routes/_public+/confirm-magic-link.tsx
index e37916ebc9..154aa94cd4 100644
--- a/apps/carbon/app/routes/_public+/confirm-magic-link.tsx
+++ b/apps/carbon/app/routes/_public+/confirm-magic-link.tsx
@@ -22,11 +22,9 @@ export default function ConfirmMagicLink() {
}
const getConfirmationURL = (token: string) => {
- return `${SUPABASE_API_URL}/auth/v1/verify?token=${token}&type=magiclink&redirect_to=${window.location.origin}/callback`;
+ return `${SUPABASE_API_URL}/auth/v1/verify?token=${token}&type=magiclink&redirect_to=${window?.location.origin}/callback`;
};
- console.log(getConfirmationURL("xxxx"));
-
return (
<AnimatePresence>
<VStack