diff --git a/src/app/page.tsx b/src/app/page.tsx
index 188089bda..7f0f05b57 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -107,7 +107,15 @@ export default async function Page(props: {
}
if (targetOrgId) {
- return ;
+ const targetOrg = orgs.find((org) => org.orgId === targetOrgId);
+ return (
+
+ );
}
return (
diff --git a/src/components/RedirectToOrg.tsx b/src/components/RedirectToOrg.tsx
index e647ee7a1..02ad97773 100644
--- a/src/components/RedirectToOrg.tsx
+++ b/src/components/RedirectToOrg.tsx
@@ -6,20 +6,29 @@ import { getInternalRedirectTarget } from "@app/lib/internalRedirect";
type RedirectToOrgProps = {
targetOrgId: string;
+ isAdminOrOwner?: boolean;
};
-export default function RedirectToOrg({ targetOrgId }: RedirectToOrgProps) {
+export default function RedirectToOrg({
+ targetOrgId,
+ isAdminOrOwner = false
+}: RedirectToOrgProps) {
const router = useRouter();
useEffect(() => {
try {
const target =
- getInternalRedirectTarget(targetOrgId) ?? `/${targetOrgId}`;
+ getInternalRedirectTarget(targetOrgId) ??
+ (isAdminOrOwner
+ ? `/${targetOrgId}/settings`
+ : `/${targetOrgId}`);
router.replace(target);
} catch {
- router.replace(`/${targetOrgId}`);
+ router.replace(
+ isAdminOrOwner ? `/${targetOrgId}/settings` : `/${targetOrgId}`
+ );
}
- }, [targetOrgId, router]);
+ }, [targetOrgId, isAdminOrOwner, router]);
return null;
}