diff --git a/app/soapbox/features/group/components/group-tags-field.tsx b/app/soapbox/features/group/components/group-tags-field.tsx index ba98d808e..f8092d5c0 100644 --- a/app/soapbox/features/group/components/group-tags-field.tsx +++ b/app/soapbox/features/group/components/group-tags-field.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useMemo } from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; import { Input, Streamfield } from 'soapbox/components/ui'; @@ -36,15 +36,19 @@ const GroupTagsField: React.FC = ({ tags, onChange, onAddItem, const HashtagField: StreamfieldComponent = ({ value, onChange, autoFocus = false }) => { const intl = useIntl(); + const formattedValue = useMemo(() => { + return `#${value}`; + }, [value]); + const handleChange: React.ChangeEventHandler = ({ target }) => { - onChange(target.value); + onChange(target.value.replace('#', '')); }; return (