Profile redesign: Nudge to add featured tags (#38315)

This commit is contained in:
Echo authored and GitHub committed 2026-03-23 09:07:53 +00:00
1 parent bd16e3f63e
commit 931da0c327
9 files changed
+169 -31

No files matched your search

@@ -6,7 +6,7 @@ import { defineMessages, useIntl } from 'react-intl';
import { Combobox } from '@/mastodon/components/form_fields';
import { useSearchTags } from '@/mastodon/hooks/useSearchTags';
import type { TagSearchResult } from '@/mastodon/hooks/useSearchTags';
import { addFeaturedTag } from '@/mastodon/reducers/slices/profile_edit';
import { addFeaturedTags } from '@/mastodon/reducers/slices/profile_edit';
import { useAppDispatch } from '@/mastodon/store';
import SearchIcon from '@/material-icons/400-24px/search.svg?react';
@@ -47,7 +47,7 @@ export const AccountEditTagSearch: FC = () => {
(item: TagSearchResult) => {
resetSearch();
setQuery('');
void dispatch(addFeaturedTag({ name: item.name }));
void dispatch(addFeaturedTags({ names: [item.name] }));
},
[dispatch, resetSearch],
);
@@ -9,7 +9,7 @@ import { useAccount } from '@/mastodon/hooks/useAccount';
import { useCurrentAccountId } from '@/mastodon/hooks/useAccountId';
import type { TagData } from '@/mastodon/reducers/slices/profile_edit';
import {
addFeaturedTag,
addFeaturedTags,
deleteFeaturedTag,
fetchProfile,
fetchSuggestedTags,
@@ -128,7 +128,7 @@ const SuggestedTag: FC<{ name: string; disabled?: boolean }> = ({
}) => {
const dispatch = useAppDispatch();
const handleAddTag = useCallback(() => {
void dispatch(addFeaturedTag({ name }));
void dispatch(addFeaturedTags({ names: [name] }));
}, [dispatch, name]);
return <Tag name={name} onClick={handleAddTag} disabled={disabled} />;
};