Files
screenclipper/apps/frontend/app/layout.tsx
T
ayrisdevandClaude Sonnet 5 5fef7460cf frontend: kullanıcı yönetimi sayfası
/users: kullanıcı listesi, ekleme formu, silme (kendi hesabını veya
son kalan tek kullanıcıyı silmeye izin verilmiyor). Nav'a link eklendi.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-01 12:28:19 +03:00

41 lines
1.3 KiB
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 type { Metadata } from "next";
import Link from "next/link";
import "./globals.css";
import { getSession } from "../lib/auth";
import { logout } from "./login/actions";
export const metadata: Metadata = {
title: "StreamClipper AI — Panel",
};
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const session = await getSession();
return (
<html lang="tr">
<body>
{session && (
<nav className="nav">
<Link href="/">Kanal Durumu</Link>
<Link href="/segments">Segment & Aday Kütüphanesi</Link>
<Link href="/settings">Ayarlar</Link>
<Link href="/users">Kullanıcılar</Link>
<span style={{ marginLeft: "auto", display: "flex", gap: "1rem", alignItems: "center" }}>
<span className="mono">{session.username}</span>
<form action={logout}>
<button
type="submit"
style={{ background: "none", border: "none", color: "var(--muted)", cursor: "pointer", font: "inherit" }}
>
Çıkış Yap
</button>
</form>
</span>
</nav>
)}
<main>{children}</main>
</body>
</html>
);
}