import { h, Component } from 'preact'; import twitterImage from 'images/twitter-logo.svg'; import githubImage from 'images/github-logo.svg'; import websiteImage from 'images/external-link-logo.svg'; export default class UserDetails extends Component { render() { const user = this.props.user let socialIcons = [] if (user.twitter_username) { socialIcons.push() } if (user.github_username) { socialIcons.push() } if (user.website_url) { socialIcons.push() } let userLocation = '' if (user.location && user.location.length > 0) { userLocation =
location
{user.location}
} return

{user.name}

{socialIcons}
{user.summary}
{userLocation}
joined
{user.joined_at}
} }