diff --git a/web/components/avatar.tsx b/web/components/avatar.tsx new file mode 100644 index 00000000..0500fced --- /dev/null +++ b/web/components/avatar.tsx @@ -0,0 +1,34 @@ +import Router from 'next/router' +import clsx from 'clsx' + +export function Avatar(props: { + username?: string + avatarUrl?: string + noLink?: boolean +}) { + const { username, avatarUrl, noLink } = props + + const onClick = + noLink && username + ? undefined + : (e: any) => { + e.stopPropagation() + Router.push(`/${username}`) + } + return ( +
@@ -301,7 +272,7 @@ function FeedQuestion(props: { contract: Contract }) {
return (
<>
{contract.creatorAvatarUrl ? (
-