import { useProject } from '../../context/Project/provider'
type Props = { overrideImagePath?: string }
const UserAvatar = (props?: Props) => {
const { currentSession } = useProject()
const avatarPath = props?.overrideImagePath ?? currentSession?.user?.avatarPath
if (avatarPath) return
else if (currentSession?.user?.firstName || currentSession?.user?.lastName) return (
{`${currentSession?.user?.firstName[0]}${currentSession?.user?.lastName[0]}`}
)
else return
}
export default UserAvatar