import Router from 'next/router' import clsx from 'clsx' import { UserCircleIcon } from '@heroicons/react/solid' export function Avatar(props: { username?: string avatarUrl?: string noLink?: boolean size?: number | 'xs' | 'sm' className?: string containerClassName?: string }) { const { username, avatarUrl, noLink, size, className, containerClassName } = props const s = size == 'xs' ? 6 : size === 'sm' ? 8 : size || 10 const onClick = noLink && username ? undefined : (e: any) => { e.stopPropagation() Router.push(`/${username}`) } return (