Add ability to feature and unfeature hashtags from web UI (#34490)
This commit is contained in:
parent
926c67c648
commit
40157e063d
5 changed files with 74 additions and 13 deletions
|
|
@ -1,4 +1,10 @@
|
|||
import { apiGetTag, apiFollowTag, apiUnfollowTag } from 'mastodon/api/tags';
|
||||
import {
|
||||
apiGetTag,
|
||||
apiFollowTag,
|
||||
apiUnfollowTag,
|
||||
apiFeatureTag,
|
||||
apiUnfeatureTag,
|
||||
} from 'mastodon/api/tags';
|
||||
import { createDataLoadingThunk } from 'mastodon/store/typed_functions';
|
||||
|
||||
export const fetchHashtag = createDataLoadingThunk(
|
||||
|
|
@ -15,3 +21,13 @@ export const unfollowHashtag = createDataLoadingThunk(
|
|||
'tags/unfollow',
|
||||
({ tagId }: { tagId: string }) => apiUnfollowTag(tagId),
|
||||
);
|
||||
|
||||
export const featureHashtag = createDataLoadingThunk(
|
||||
'tags/feature',
|
||||
({ tagId }: { tagId: string }) => apiFeatureTag(tagId),
|
||||
);
|
||||
|
||||
export const unfeatureHashtag = createDataLoadingThunk(
|
||||
'tags/unfeature',
|
||||
({ tagId }: { tagId: string }) => apiUnfeatureTag(tagId),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue