MCPcopy Index your code
hub / github.com/AnswerOverflow/AnswerOverflow / ServerIcon

Function ServerIcon

packages/ui/src/server-icon.tsx:18–54  ·  view source on GitHub ↗
(props: ServerIconProps)

Source from the content-addressed store, hash-verified

16};
17
18export function ServerIcon(props: ServerIconProps) {
19 const { className, size = 64, ...rest } = props;
20 const serverIconUrl = makeServerIconLink(props.server, size);
21 return (
22 <Avatar
23 {...props}
24 className={className}
25 style={{
26 width: size,
27 height: size,
28 }}
29 {...rest}
30 >
31 <AvatarImage
32 src={serverIconUrl}
33 width={size}
34 height={size}
35 alt={props.server.name}
36 {...props}
37 />
38 <AvatarFallback
39 {...props}
40 className={cn(
41 'relative flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-neutral-50 text-center dark:bg-neutral-700',
42 size > 64 ? 'text-4xl' : 'text-xl',
43 className,
44 )}
45 style={{
46 width: size,
47 height: size,
48 }}
49 >
50 {getInitials(props.server.name)}
51 </AvatarFallback>
52 </Avatar>
53 );
54}

Callers

nothing calls this directly

Calls 3

cnFunction · 0.90
getInitialsFunction · 0.90
makeServerIconLinkFunction · 0.70

Tested by

no test coverage detected