Skip to content

Commit c76c15c

Browse files
committed
Revert "fix: use Intl.Segmenter for avatar first character extraction"
This reverts commit eb8c0da.
1 parent eb8c0da commit c76c15c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

app/components/BlueskyComment.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ function getHostname(uri: string): string {
3838
return uri
3939
}
4040
}
41-
42-
function firstChar(str: string): string {
43-
const segmenter = new Intl.Segmenter({ granularity: 'grapheme' })
44-
return Array.from(segmenter.segment(str))[0]?.segment ?? ''
45-
}
4641
</script>
4742

4843
<template>
@@ -70,7 +65,7 @@ function firstChar(str: string): string {
7065
depth === 0 ? 'w-10 h-10' : 'w-8 h-8 text-sm',
7166
]"
7267
>
73-
{{ firstChar(comment.author.displayName || comment.author.handle).toUpperCase() }}
68+
{{ (comment.author.displayName || comment.author.handle).charAt(0).toUpperCase() }}
7469
</div>
7570
</a>
7671

0 commit comments

Comments
 (0)