feat(ux): shared PageTitle/SectionTitle primitive, adopt app-wide

- new components/ui/page-title.tsx (PageHeader/PageTitle/SectionTitle)
- every page heading routed through PageTitle (one source of truth
  for the page-title style; identical render)
- members restricted-directory screen now uses the standard
  PageHeader bar instead of an off-style mono heading
This commit is contained in:
Moheeb Zara
2026-05-15 22:12:52 -07:00
parent 3360f54232
commit 92ba6fb390
22 changed files with 96 additions and 29 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import { redirect } from 'next/navigation'
import { createClient } from '@/lib/supabase/server'
import { NewPolicyForm } from './new-policy-form'
import { PageTitle } from '@/components/ui/page-title'
export const dynamic = 'force-dynamic'
@@ -21,7 +22,7 @@ export default async function NewPolicyPage() {
return (
<div className="min-h-screen bg-background">
<div className="bg-sidebar px-4 md:px-6 py-3">
<h1 className="text-white font-sans text-lg font-semibold">New policy</h1>
<PageTitle>New policy</PageTitle>
</div>
<div className="p-4 md:p-6 max-w-2xl">
<NewPolicyForm />
+2 -1
View File
@@ -2,6 +2,7 @@ import Link from 'next/link'
import { redirect } from 'next/navigation'
import { createClient } from '@/lib/supabase/server'
import type { Policy, PolicyStatus } from '@/lib/types'
import { PageTitle } from '@/components/ui/page-title'
export const dynamic = 'force-dynamic'
@@ -49,7 +50,7 @@ export default async function PoliciesPage() {
return (
<div className="min-h-screen bg-background">
<div className="bg-sidebar px-4 md:px-6 py-3 flex items-center justify-between">
<h1 className="text-white font-sans text-lg font-semibold">Policies</h1>
<PageTitle>Policies</PageTitle>
{isAdminOrBoard && (
<Link
href="/policies/new"