peppa/apps/web/app/(app)/layout.tsx
Асель 412f5f05ce PEP-61: top menu — Home instead of Inbox, Runners and Projects pages
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:02:37 +05:00

30 lines
892 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Link from "next/link";
import type { ReactNode } from "react";
import { requireUser } from "@/lib/auth";
import { Footer } from "@/components/Footer";
import { Nav, SettingsLink } from "@/components/Nav";
export const dynamic = "force-dynamic";
export default async function AppLayout({ children }: { children: ReactNode }) {
const user = await requireUser();
return (
<>
<header className="top">
<Link href="/" className="brand">🐷 Peppa</Link>
<Nav />
<div className="me">
<SettingsLink />
{user.avatarUrl && <img src={user.avatarUrl} alt="" width={24} height={24} />}
<span>{user.login}</span>
<form action="/logout" method="post">
<button className="link">Выйти</button>
</form>
</div>
</header>
<main>{children}</main>
<Footer />
</>
);
}