import Image from 'next/image'; import { parse as URIparse } from 'uri-js'; import date from '../lib/date'; import style from '../styles/github-profile.module.css'; function CardRow({label, children}: {label: string, children: JSX.Element | string}) { return !children? <> : (
{label} {children}
); } function GitHubProfile({user}: any) { return (<>
{`${user.login}'s
{user.name} {user.login} {user.html_url} {user.blog && {user.blog} } {user.location} {user.bio} {user.created_at ? date.toRelativeDate(user.created_at) : ''} {user.updated_at && {user.updated_at ? date.toRelativeDate(user.updated_at) : ''}} {user.twitter_username && @{user.twitter_username} }
); } export default GitHubProfile;