diff --git a/app/soapbox/components/account-search.tsx b/app/soapbox/components/account-search.tsx index 8b3f50b20..c519b0243 100644 --- a/app/soapbox/components/account-search.tsx +++ b/app/soapbox/components/account-search.tsx @@ -5,7 +5,6 @@ import { defineMessages, useIntl } from 'react-intl'; import AutosuggestAccountInput from 'soapbox/components/autosuggest-account-input'; import SvgIcon from './ui/icon/svg-icon'; -import { InputThemes } from './ui/input/input'; const messages = defineMessages({ placeholder: { id: 'account_search.placeholder', defaultMessage: 'Search for an account' }, @@ -16,20 +15,10 @@ interface IAccountSearch { onSelected: (accountId: string) => void, /** Override the default placeholder of the input. */ placeholder?: string, - /** Position of results relative to the input. */ - resultsPosition?: 'above' | 'below', - /** Optional class for the input */ - className?: string, - autoFocus?: boolean, - hidePortal?: boolean, - theme?: InputThemes, - showButtons?: boolean, - /** Search only among people who follow you (TruthSocial). */ - followers?: boolean, } /** Input to search for accounts. */ -const AccountSearch: React.FC = ({ onSelected, className, showButtons = true, ...rest }) => { +const AccountSearch: React.FC = ({ onSelected, ...rest }) => { const intl = useIntl(); const [value, setValue] = useState(''); @@ -71,7 +60,7 @@ const AccountSearch: React.FC = ({ onSelected, className, showBu
= ({ onSelected, className, showBu {...rest} /> - {showButtons && ( -
- +
+ - -
- )} + +
); diff --git a/app/soapbox/components/autosuggest-account-input.tsx b/app/soapbox/components/autosuggest-account-input.tsx index 352be593b..b2a205e3c 100644 --- a/app/soapbox/components/autosuggest-account-input.tsx +++ b/app/soapbox/components/autosuggest-account-input.tsx @@ -22,8 +22,6 @@ interface IAutosuggestAccountInput { menu?: Menu, onKeyDown?: React.KeyboardEventHandler, theme?: InputThemes, - /** Search only among people who follow you (TruthSocial). */ - followers?: boolean, } const AutosuggestAccountInput: React.FC = ({ @@ -31,7 +29,6 @@ const AutosuggestAccountInput: React.FC = ({ onSelected, value = '', limit = 4, - followers = false, ...rest }) => { const dispatch = useAppDispatch(); @@ -48,7 +45,7 @@ const AutosuggestAccountInput: React.FC = ({ }; const handleAccountSearch = useCallback(throttle(q => { - const params = { q, limit, followers, resolve: false }; + const params = { q, limit, resolve: false }; dispatch(accountSearch(params, controller.current.signal)) .then((accounts: { id: string }[]) => { diff --git a/app/soapbox/components/autosuggest-input.tsx b/app/soapbox/components/autosuggest-input.tsx index 87f1c41f5..35460131a 100644 --- a/app/soapbox/components/autosuggest-input.tsx +++ b/app/soapbox/components/autosuggest-input.tsx @@ -31,7 +31,6 @@ export interface IAutosuggestInput extends Pick, hidePortal?: boolean, theme?: InputThemes, @@ -43,7 +42,6 @@ export default class AutosuggestInput extends ImmutablePureComponent { @@ -260,19 +258,15 @@ export default class AutosuggestInput extends ImmutablePureComponent