Files
community-rule/lib/navigationChromelessPath.ts
T
adilallo a725cf1a32 Spend login, invite, and email-change links only after a confirm POST so mail scanners cannot use them up.
GET still shows a one-button page, a used invitation can resend or reopen for the signed-in invitee, and an email-change GET no longer signs the account out.
2026-11-22 16:58:30 -07:00

22 lines
559 B
TypeScript

/**
* Routes that render product chrome only (`CreateFlowTopNav`), not marketing `Top`.
* Keep in sync with `ConditionalNavigationClient`.
*/
export function isChromelessNavigationPath(
pathname: string | null | undefined,
): boolean {
if (!pathname) {
return false;
}
if (
pathname.startsWith("/create") ||
pathname === "/login" ||
pathname.startsWith("/login/") ||
pathname.startsWith("/invite") ||
pathname.startsWith("/email-change")
) {
return true;
}
return /^\/use-cases\/[^/]+\/rule\/?$/.test(pathname);
}