import { Github, Globe, LinkedinIcon, Mail, Pencil, Twitter, } from 'lucide-react'; import type { GetPublicProfileResponse } from '../../api/user'; import { DailyDevIcon } from '../DailyDevIcon'; type UserPublicProfileHeaderProps = { userDetails: GetPublicProfileResponse; }; export function UserPublicProfileHeader(props: UserPublicProfileHeaderProps) { const { userDetails } = props; const { name, links, publicConfig, avatar, email, isOwnProfile } = userDetails; const { headline, isAvailableForHire, isEmailVisible } = publicConfig!; return (
{name}
{isAvailableForHire && ( Available for hire )}

{name}

{headline}

{links?.github && } {links?.linkedin && ( )} {links?.twitter && } {links?.dailydev && ( )} {links?.website && } {isEmailVisible && }
{isOwnProfile && ( Edit Profile )}
); } type UserLinkProps = { href: string; icon: ((props: React.SVGProps) => JSX.Element) | typeof Globe; }; export function UserLink(props: UserLinkProps) { const { href, icon: Icon } = props; return ( ); }