MCPcopy Create free account
hub / github.com/AnswerOverflow/AnswerOverflow / MessageAuthorArea

Function MessageAuthorArea

packages/ui/src/message/Message.tsx:19–46  ·  view source on GitHub ↗
(props: Pick<MessageProps, 'message'>)

Source from the content-addressed store, hash-verified

17import { MessageProps } from './props';
18
19export const MessageAuthorArea = (props: Pick<MessageProps, 'message'>) => {
20 const { message } = props;
21 return (
22 <div className="flex w-full min-w-0 gap-2">
23 {/* TODO: sort out responsive styling */}
24 <div className="flex w-full flex-row items-center gap-2 font-body text-lg text-black/[.7] dark:text-white/[.47]">
25 <DiscordAvatar user={message.author} size={40} />
26 <Link className="mr-1" href={`/u/${message.author.id}`}>
27 <span className="text-black/[.7] hover:underline dark:text-white/[.47]">
28 {message.author.name}
29 </span>
30 </Link>
31 <div className="ml-auto mr-4 flex flex-row gap-2">
32 <TrackLinkButton
33 href={getDiscordURLForMessage(message)}
34 eventName={'View On Discord Click'}
35 eventData={messageWithDiscordAccountToAnalyticsData(message)}
36 className="h-8 w-8 bg-transparent p-1 hover:bg-transparent dark:bg-transparent dark:hover:bg-transparent"
37 >
38 <DiscordIcon className="h-8 w-8" color="primary" />
39 <span className="sr-only">View on Discord</span>
40 </TrackLinkButton>
41 </div>
42 <span>{getSnowflakeUTCDate(message.id)}</span>
43 </div>
44 </div>
45 );
46};
47
48const DEFAULT_COLLAPSE_CONTENT_LENGTH = 500;
49

Callers

nothing calls this directly

Calls 3

getDiscordURLForMessageFunction · 0.90
getSnowflakeUTCDateFunction · 0.90

Tested by

no test coverage detected