Trim first character from emoji name in ChoreCard component
This commit is contained in:
parent
09a4bbd471
commit
45deaf476f
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue