feat: portal selector home page + remove self-serve signup
Replace the home page with a portal selector showing three access paths: - Organisation Portal → /org/login - Chapter Portal → /login - Member Portal → /member-login Remove /signup and its BFF route — tenants are now only created by org owners through the org portal or assigned by super admins. Self-serve community creation is no longer supported. Update sidebar to bypass auth guard for / (exact match) without accidentally matching all paths via startsWith. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@ const SUPER_ADMIN_LINKS = [
|
||||
{ href: '/admin/drafts', label: 'AI Drafts' },
|
||||
];
|
||||
|
||||
const PUBLIC_PATHS = ['/login', '/signup', '/onboard', '/member-login'];
|
||||
const PUBLIC_PATHS = ['/login', '/onboard', '/member-login'];
|
||||
const ADMIN_PATHS = ['/admin'];
|
||||
const MEMBER_PATHS = ['/my'];
|
||||
const ORG_PATHS = ['/org'];
|
||||
@@ -43,6 +43,7 @@ export function Sidebar() {
|
||||
|
||||
useEffect(() => {
|
||||
if (loading) return;
|
||||
if (pathname === '/') return;
|
||||
if (PUBLIC_PATHS.some((p) => pathname.startsWith(p))) return;
|
||||
if (ADMIN_PATHS.some((p) => pathname.startsWith(p))) return;
|
||||
if (MEMBER_PATHS.some((p) => pathname.startsWith(p))) return;
|
||||
@@ -52,7 +53,7 @@ export function Sidebar() {
|
||||
}
|
||||
}, [loading, admin, pathname, router]);
|
||||
|
||||
if (PUBLIC_PATHS.some((p) => pathname.startsWith(p))) {
|
||||
if (pathname === '/' || PUBLIC_PATHS.some((p) => pathname.startsWith(p))) {
|
||||
return (
|
||||
<nav className="w-52 shrink-0 bg-white border-r border-gray-200 p-4">
|
||||
<span className="font-bold text-base">TOWER</span>
|
||||
|
||||
Reference in New Issue
Block a user