MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / getLetter

Function getLetter

apps/web/ui/CommunityIcon/index.tsx:11–16  ·  view source on GitHub ↗
(name?: string)

Source from the content-addressed store, hash-verified

9}
10
11function getLetter(name?: string) {
12 if (!name || name.length === 0) {
13 return 'C';
14 }
15 return name.trim().toUpperCase().charAt(0);
16}
17
18export default function CommunityIcon({ community }: Props) {
19 const [loaded, setLoaded] = useState(false);

Callers 1

CommunityIconFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected