import { UserCircleIcon } from '@heroicons/react/solid'; import Link from 'next/link'; import React, { useState } from 'react'; import CachedImage from '../Common/CachedImage'; interface PersonCardProps { personId: number; name: string; subName?: string; profilePath?: string; canExpand?: boolean; } const PersonCard: React.FC = ({ personId, name, subName, profilePath, canExpand = false, }) => { const [isHovered, setHovered] = useState(false); return ( { setHovered(true); }} onMouseLeave={() => setHovered(false)} onKeyDown={(e) => { if (e.key === 'Enter') { setHovered(true); } }} role="link" tabIndex={0} >
{profilePath ? (
) : ( )}
{name}
{subName && (
{subName}
)}
); }; export default PersonCard;