This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/website/components/UserCard/UserCard.jsx
2020-08-03 14:37:05 +02:00

26 lines
674 B
JavaScript

import Link from 'next/link'
import { forwardRef, memo } from 'react'
import { API_URL } from '../../utils/api'
import './UserCard.css'
const UserCard = memo(
forwardRef((props, ref) => {
return (
<div className='UserCard col-sm-24 col-md-10 col-xl-7' ref={ref}>
<Link href='/users/[name]' as={`/users/${props.name}`}>
<a className='UserCard__container'>
<img
className='UserCard__logo'
src={API_URL + props.logo}
alt={props.name}
/>
<h2 className='UserCard__name'>{props.name}</h2>
</a>
</Link>
</div>
)
})
)
export default UserCard