"use client" import { useRouter } from "next/navigation" import { createClient } from "@/lib/supabase/client" import { BookOpen, Bookmark, ListIcon, LogOut, Film } from "lucide-react" import { ThemeSelector } from "@/components/theme-selector" interface ProfileContentProps { profile: { display_name: string; avatar_url: string | null; theme?: string } | null email: string stats: { diary: number watchlist: number lists: number } } export function ProfileContent({ profile, email, stats, }: ProfileContentProps) { const router = useRouter() async function handleLogout() { const supabase = createClient() await supabase.auth.signOut() router.push("/auth/login") router.refresh() } const initials = profile?.display_name ? profile.display_name.slice(0, 2).toUpperCase() : "?" return (

Profil

{/* Avatar & Name */}
{initials}

{profile?.display_name || "Film-Fan"}

{email}

{/* Stats */}
{/* Actions */}
{/* App info */}
InFocus

Familienfilm-Tagebuch

{/* Theme Selector */}
) } function StatCard({ icon: Icon, label, value, }: { icon: typeof BookOpen label: string value: number }) { return (
{value} {label}
) }