MCPcopy Create free account
hub / github.com/dailydotdev/apps / Image

Function Image

packages/shared/src/components/widgets/PostUsersHighlights.tsx:81–119  ·  view source on GitHub ↗
(props: ImageProps)

Source from the content-addressed store, hash-verified

79};
80
81const Image = (props: ImageProps) => {
82 const { userType, name, permalink, image, className } = props;
83
84 if (userType === UserType.Source) {
85 return (
86 <LinkWithTooltip
87 href={permalink}
88 passHref
89 prefetch={false}
90 tooltip={{
91 placement: 'bottom',
92 content: name,
93 }}
94 >
95 <StyledImage
96 className={classNames('cursor-pointer rounded-full', className)}
97 imgSrc={image}
98 fallbackSrc={fallbackImages.avatar}
99 imgAlt={name}
100 background="var(--theme-background-subtle)"
101 />
102 </LinkWithTooltip>
103 );
104 }
105
106 const user = props as CommentAuthor;
107
108 return (
109 <ProfileLink href={user.permalink} data-testid="authorLink">
110 <StyledImage
111 className="rounded-12"
112 imgSrc={image}
113 fallbackSrc={fallbackImages.avatar}
114 imgAlt={name}
115 background="var(--theme-background-subtle)"
116 />
117 </ProfileLink>
118 );
119};
120
121const userTypes = [UserType.Author, UserType.Scout];
122

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected