Implement mentions rendering

This commit is contained in:
Paul Frazee 2022-10-03 16:02:03 -05:00
parent 2058505bf1
commit 195d2f7d2b
7 changed files with 177 additions and 19 deletions

View file

@ -79,7 +79,7 @@ export function Component({replyTo}: {replyTo?: string}) {
const textDecorated = useMemo(() => {
return (text || '').split(/(\s)/g).map((item, i) => {
if (/@[a-zA-Z0-9]+/g.test(item)) {
if (/^@[a-zA-Z0-9\.-]+$/g.test(item)) {
return (
<Text key={i} style={{color: colors.blue3}}>
{item}