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

25 lines
650 B
React
Raw Permalink Normal View History

import Link from 'next/link'
import { forwardRef, memo } from 'react'
import { API_URL } from '../../utils/api'
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