Page management, step 2: the core pages as sections
Migrations 081 and 082: Feedback, Request, QR codes, Give, Privacy and Terms become pages of sections. Their forms and embeds are section types any page can use; Give's words and all of Privacy and Terms become blocks. The privacy contact email is written into the policy and its setting goes. Core pages keep their address and can't be deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1342691f49
commit
f33c0008fe
27 changed files with 298 additions and 645 deletions
|
|
@ -2,16 +2,14 @@
|
|||
PAGE AT PATH: any address the record routes don't take
|
||||
|
||||
Pages → Page management decides what's where: the site_pages row
|
||||
at this path (useSiteNav) is drawn by its code when it's one of
|
||||
the fixed pages (fixedPages.ts), or as its sections (SitePage).
|
||||
No page there (or a hidden one, below viewer, which isn't sent):
|
||||
Not found.
|
||||
at this path (useSiteNav), drawn as its sections (SitePage). The
|
||||
front page is the index route of its own (Home.tsx). No page there
|
||||
(or a hidden one, below viewer, which isn't sent): Not found.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
import { useLocation } from 'react-router-dom'
|
||||
|
||||
import { useSiteNav } from '../lib/useSiteNav.ts'
|
||||
import { FIXED_PAGES } from './fixedPages.ts'
|
||||
import NotFound from './NotFound.tsx'
|
||||
import SitePage from './SitePage.tsx'
|
||||
|
||||
|
|
@ -24,8 +22,5 @@ export default function PageAtPath() {
|
|||
|
||||
const page = pageAt(pathname)
|
||||
if (!page || page.path === '/') return <NotFound />
|
||||
|
||||
const Fixed = FIXED_PAGES[page.id]
|
||||
if (Fixed) return <Fixed key={page.id} page={page} />
|
||||
return <SitePage key={page.id} id={page.id} />
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue