'use client' import Image from 'next/image' import Link from 'next/link' import { useRouter } from 'next/navigation' import { ProjectGrid } from './project-grid' import { HubFooter } from './hub-footer' import type { Project } from '../lib/projects/types' function GitHubIcon({ className }: { className?: string }) { return ( ) } function XIcon({ className }: { className?: string }) { return ( ) } function YouTubeIcon({ className }: { className?: string }) { return ( ) } interface PublicProfilePageProps { profile: { id: string name: string image: string | null username: string githubUrl: string | null xUrl: string | null youtubeUrl: string | null } projects: Project[] } export function PublicProfilePage({ profile, projects }: PublicProfilePageProps) { const router = useRouter() return (
{/* Header — same layout as the community home */}
Pascal Pascal Editor Open Source
{/* Profile Header */}
{profile.image ? ( {profile.name} ) : (
{profile.name[0]?.toUpperCase() || '?'}
)}

{profile.name}

@{profile.username}

{(profile.githubUrl || profile.xUrl || profile.youtubeUrl) && (
{profile.githubUrl && ( )} {profile.xUrl && ( )} {profile.youtubeUrl && ( )}
)}
{/* Projects */}

Public Projects

{projects.length > 0 ? ( router.push(`/viewer/${id}`)} showOwner={false} /> ) : (
No public projects yet
)}
) }