Collection editor: Format topic as hashtag (#38153)
This commit is contained in:
1 parent
3091e2e525
commit
3ef7d2835a
4 files changed
+81
-17
No files matched your search
@@ -6,6 +6,7 @@ import { useHistory } from 'react-router-dom';
|
||||
|
||||
import { isFulfilled } from '@reduxjs/toolkit';
|
||||
|
||||
import { inputToHashtag } from '@/mastodon/utils/hashtags';
|
||||
import type {
|
||||
ApiCreateCollectionPayload,
|
||||
ApiUpdateCollectionPayload,
|
||||
@@ -64,7 +65,7 @@ export const CollectionDetails: React.FC = () => {
|
||||
dispatch(
|
||||
updateCollectionEditorField({
|
||||
field: 'topic',
|
||||
value: event.target.value,
|
||||
value: inputToHashtag(event.target.value),
|
||||
}),
|
||||
);
|
||||
},
|
||||
@@ -219,6 +220,9 @@ export const CollectionDetails: React.FC = () => {
|
||||
}
|
||||
value={topic}
|
||||
onChange={handleTopicChange}
|
||||
autoCapitalize='off'
|
||||
autoCorrect='off'
|
||||
spellCheck='false'
|
||||
maxLength={40}
|
||||
/>
|
||||
|
||||
|
||||
Reference in new issue
Block a user