We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7f7d375 + ac73471 commit 5993684Copy full SHA for 5993684
src/routes/(console)/(redirects)/members/+page.ts
@@ -0,0 +1,13 @@
1
+import { redirect } from '@sveltejs/kit';
2
+import { base } from '$app/paths';
3
+import type { PageLoad } from './$types';
4
+
5
+export const load: PageLoad = async ({ parent }) => {
6
+ const { organizations, account } = await parent();
7
8
+ const teamId = account.prefs.organization ?? organizations.teams[0]?.$id;
9
+ if (teamId) {
10
+ redirect(303, `${base}/organization-${teamId}/members`);
11
+ }
12
+ redirect(303, base);
13
+};
0 commit comments