import { FC, useMemo } from 'react' import { Card, CardActionArea, CardContent, CardMedia, CardProps, Typography } from '@mui/material' import { EmployeeDescription } from 'components/molecules/EmployeeDescription/index.js' export type EmployeeCardProps = Omit & { name: string image: string position?: string description?: Partial onClick?: (event: React.MouseEvent, description: EmployeeDescription) => void } export const EmplyeeCard: FC = ({ name, position, image, description = {}, sx, onClick, ...props }) => { const handleClick = (event: React.MouseEvent) => { onClick(event, { title: name, image: image, position: position, ...description, }) } const content = useMemo( () => [ , {name} {position && ( {position} )} , ], [name, position, image] ) return ( {content} ) } export default EmplyeeCard