SPB Git

Repository Public

layout.tsx 1.1 KB 20 lines tsx

1import Link from "next/link";2import { LinkBase } from "@/lib/client/base";3import { requireEditorPage } from "@/lib/studio/guard";45/** Private preview: the public pages, drawn from the working copy, for a signed-in editor only. */6export default async function PreviewLayout({ children }: { children: React.ReactNode }) {7  await requireEditorPage();8  return (9    <LinkBase base="/admin/apercu">10      <div role="region" aria-label="Aperçu privé" data-testid="private-preview-banner" className="no-print sticky top-0 z-50 bg-violet text-on-accent">11        <div className="shell flex min-h-11 flex-wrap items-center justify-between gap-x-4 gap-y-1 py-1.5 text-sm font-medium">12          <span><span aria-hidden="true">◆ </span><strong>Aperçu privé</strong> — copie de travail, visible de vous seul. Ce n’est pas le site public.</span>13          <Link href="/admin/seances" className="rounded-full border border-current px-3 py-1 hover:underline">Retour au studio</Link>14        </div>15      </div>16      <main id="contenu" className="font-normal" style={{ fontSize: "1rem" }}>{children}</main>17    </LinkBase>18  );19}20
Files main
Menu

Theme