diff --git a/src/components/autosuggest-account-input.tsx b/src/components/autosuggest-account-input.tsx index c64e92592..18603dbb3 100644 --- a/src/components/autosuggest-account-input.tsx +++ b/src/components/autosuggest-account-input.tsx @@ -1,5 +1,4 @@ import { throttle } from 'es-toolkit'; -import { OrderedSet as ImmutableOrderedSet } from 'immutable'; import { useState, useRef, useCallback, useEffect } from 'react'; import { accountSearch } from 'soapbox/actions/accounts.ts'; @@ -32,7 +31,7 @@ const AutosuggestAccountInput: React.FC = ({ ...rest }) => { const dispatch = useAppDispatch(); - const [accountIds, setAccountIds] = useState(ImmutableOrderedSet()); + const [accountIds, setAccountIds] = useState(new Set()); const controller = useRef(new AbortController()); const refreshCancelToken = () => { @@ -41,7 +40,7 @@ const AutosuggestAccountInput: React.FC = ({ }; const clearResults = () => { - setAccountIds(ImmutableOrderedSet()); + setAccountIds(new Set()); }; const handleAccountSearch = useCallback(throttle((q) => { @@ -50,7 +49,7 @@ const AutosuggestAccountInput: React.FC = ({ dispatch(accountSearch(params, controller.current.signal)) .then((accounts: { id: string }[]) => { const accountIds = accounts.map(account => account.id); - setAccountIds(ImmutableOrderedSet(accountIds)); + setAccountIds(new Set(accountIds)); }) .catch(noOp); }, 900, { edges: ['leading', 'trailing'] }), [limit]); @@ -83,7 +82,7 @@ const AutosuggestAccountInput: React.FC = ({