Files
hanzo.ai/app/(marketing)/referral/layout.tsx
zeekay 12b5ca7699 the index decision has one home, and it was already there
The commit before this gave six pages `noindex` in their metadata. lib/publish
already names all six, and scripts/noindex.mjs writes the tag into the export
and THROWS on a page that already carries one — "lib/publish is the one place
that decides this", in its own words. Four of the six (/dashboard, /referral,
/organization-profile, /user-profile) resolve to that policy, so `pnpm build`
would have thrown on the first of them and published nothing.

That is precisely the drift those scripts exist to refuse, and I added it while
reading the file that refuses it. The option is gone from pageMeta rather than
left unused, and the doc comment now says where the decision lives, at the spot
someone would reach for it.

The titles stay: no other place says what a tab or a shared link should read,
which was the actual gap. So do the canonicals — canonical.mjs skips a page
that declares its own and only throws when one is MISSING, so a redirect shell
naming its destination is the supported path rather than a second source.
2026-08-21 15:01:05 -07:00

16 lines
591 B
TypeScript

import type { Metadata } from 'next'
import { pageMeta } from '@/lib/page-meta'
// The page is 'use client', so it can export no metadata of its own and served
// the root's title. Whether it is indexed is decided by lib/publish, which
// already names it — a second declaration here makes scripts/noindex.mjs throw.
export const metadata: Metadata = pageMeta({
title: 'Referrals',
description: 'Your referral code, the people it brought, and what it earned.',
path: '/referral',
})
export default function Layout({ children }: { children: React.ReactNode }) {
return children
}