diff --git a/apps/web/app/(auth)/invite/page.tsx b/apps/web/app/(auth)/invite/page.tsx index 7c18854517..b67def8e32 100644 --- a/apps/web/app/(auth)/invite/page.tsx +++ b/apps/web/app/(auth)/invite/page.tsx @@ -88,6 +88,8 @@ const Page = async ({ searchParams }) => { await updateUser(session.user.id, { notificationSettings: { ...session.user.notificationSettings, + alert: session.user.notificationSettings.alert ?? {}, + weeklySummary: session.user.notificationSettings.weeklySummary ?? {}, unsubscribedOrganizationIds: Array.from( new Set([ ...(session.user.notificationSettings?.unsubscribedOrganizationIds || []), diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index 21a799bf9f..787e4c3e4d 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -27,9 +27,6 @@ const Page = async () => { let environment: TEnvironment | null = null; try { environment = await getFirstEnvironmentByUserId(session?.user.id); - if (!environment) { - throw new Error("No environment found"); - } } catch (error) { console.error(`error getting environment: ${error}`); } @@ -41,7 +38,7 @@ const Page = async () => { } if (!environment) { - console.error("Failed to get first environment of user; signing out"); + console.error("Failed to get first environment of user"); return redirect(`/organizations/${userOrganizations[0].id}/products/new/channel`); }