"use client"; /** * ProfileViewHeader — the read-only header used in view mode on /u/me. * Mirrors the shape of /u/[handle]'s top block so the owner sees the same * thing visitors do, plus an action slot for an "Edit profile" button. */ import type { User } from "@/lib/auth"; import { UserAvatar } from "@/components/ui/user-avatar"; export function ProfileViewHeader({ user, postCount, actionSlot, }: { user: User; postCount: number; actionSlot?: React.ReactNode; }) { return (

{user.name}

@{user.handle} ·{" "} {postCount} post {postCount === 1 ? "" : "s"}

Joined {new Date(user.created_at).toLocaleDateString()}

{actionSlot ?
{actionSlot}
: null}
); }