Hold /privacy behind a flag until counsel reads it, and fix leftover legal and email copy.

This commit is contained in:
adilallo committed 2026-11-20 15:36:06 -07:00
1 parent ead6c8f716
commit 072e5362f5
43 files changed
+548 -191

No files matched your search

@@ -8,6 +8,7 @@ import {
} from "../../../lib/legalSyntheticPost";
import { getRequestSiteOrigin } from "../../../lib/requestSiteOrigin";
import { absoluteSiteUrl } from "../../../lib/siteMetadata";
import { isPrivacyPolicyEnabled } from "../../../lib/privacyPolicyEnabled";
import ContentBanner from "../../components/sections/ContentBanner";
type LegalDocumentPageProps = {
@@ -45,7 +46,9 @@ function LegalInlineText({ text }: { text: string }) {
const label = match[1];
const href = match[2];
if (isSafeHref(href)) {
if (href === "/privacy" && !isPrivacyPolicyEnabled()) {
nodes.push(label);
} else if (isSafeHref(href)) {
const isInternal = href.startsWith("/") && !href.startsWith("//");
nodes.push(
isInternal ? (
+2 -1
View File
@@ -5,12 +5,13 @@ import SkipToContent from "../components/navigation/SkipToContent";
import { MessagesProvider } from "../contexts/MessagesContext";
import { AuthModalProvider } from "../contexts/AuthModalContext";
import { MAIN_CONTENT_ID } from "../../lib/mainContent";
import { isPrivacyPolicyEnabled } from "../../lib/privacyPolicyEnabled";
import marketingMessages from "../../messages/en/marketing";
export default function MarketingLayout({ children }: { children: ReactNode }) {
return (
<MessagesProvider messages={marketingMessages}>
<AuthModalProvider>
<AuthModalProvider privacyEnabled={isPrivacyPolicyEnabled()}>
{/*
* Same session-aware shell as `(app)` / `(admin)`: `ConditionalNavigation`
* reads the cookie behind Suspense so the static page shell can prerender
+4
View File
@@ -3,8 +3,10 @@
* https://www.figma.com/design/agv0VBLiBlcnSAaiAORgPR/Community-Rule-System?node-id=19003-23305
*/
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import messages from "../../../messages/en/index";
import { legalPathForSlug } from "../../../lib/legalSyntheticPost";
import { isPrivacyPolicyEnabled } from "../../../lib/privacyPolicyEnabled";
import { routeMetadata } from "../../../lib/siteMetadata";
import LegalDocumentPage, {
legalPageMetadata,
@@ -14,6 +16,7 @@ const SLUG = "privacy" as const;
const PATH = legalPathForSlug(SLUG);
export function generateMetadata(): Metadata {
if (!isPrivacyPolicyEnabled()) notFound();
return routeMetadata(
PATH,
legalPageMetadata(messages.metadata.privacy, messages.pages.privacy),
@@ -21,6 +24,7 @@ export function generateMetadata(): Metadata {
}
export default function PrivacyPage() {
if (!isPrivacyPolicyEnabled()) notFound();
return (
<LegalDocumentPage
slug={SLUG}