Trim first character from emoji name in ChoreCard component

This commit is contained in:
Mo Tarbin 2024-07-07 03:18:24 -04:00
parent 09a4bbd471
commit 45deaf476f

View file

@ -324,7 +324,7 @@ const ChoreCard = ({ chore, performers, onChoreUpdate, onChoreRemove, sx }) => {
const split = Array.from(chore.name) const split = Array.from(chore.name)
// if the first character is emoji then remove it from the name // if the first character is emoji then remove it from the name
if (/\p{Emoji}/u.test(split[0])) { if (/\p{Emoji}/u.test(split[0])) {
return split.slice(2).join('') return split.slice(1).join('').trim()
} }
return name return name
} }