- {suggestions.size > 0 ? suggestions.map((suggestion: { account: string }) => (
-
diff --git a/app/soapbox/features/search/index.tsx b/app/soapbox/features/search/index.tsx
index 3fdf625f68..c17691c37f 100644
--- a/app/soapbox/features/search/index.tsx
+++ b/app/soapbox/features/search/index.tsx
@@ -3,7 +3,7 @@ import { defineMessages, useIntl } from 'react-intl';
import { Column } from 'soapbox/components/ui';
import Search from 'soapbox/features/compose/components/search';
-import SearchResultsContainer from 'soapbox/features/compose/containers/search_results_container';
+import SearchResults from 'soapbox/features/compose/components/search_results';
const messages = defineMessages({
heading: { id: 'column.search', defaultMessage: 'Search' },
@@ -16,7 +16,7 @@ const SearchPage = () => {
-
+
);
diff --git a/app/soapbox/reducers/__tests__/search-test.js b/app/soapbox/reducers/__tests__/search-test.js
index b1138b6631..c3b8d1ea0c 100644
Binary files a/app/soapbox/reducers/__tests__/search-test.js and b/app/soapbox/reducers/__tests__/search-test.js differ
diff --git a/app/soapbox/reducers/__tests__/suggestions-test.js b/app/soapbox/reducers/__tests__/suggestions-test.js
index 7da0b7f750..3a11b5b56a 100644
Binary files a/app/soapbox/reducers/__tests__/suggestions-test.js and b/app/soapbox/reducers/__tests__/suggestions-test.js differ
diff --git a/app/soapbox/reducers/__tests__/trends-test.js b/app/soapbox/reducers/__tests__/trends-test.js
index 5ebeabb31d..22d7d34e4f 100644
Binary files a/app/soapbox/reducers/__tests__/trends-test.js and b/app/soapbox/reducers/__tests__/trends-test.js differ
diff --git a/app/soapbox/reducers/search.js b/app/soapbox/reducers/search.ts
similarity index 69%
rename from app/soapbox/reducers/search.js
rename to app/soapbox/reducers/search.ts
index e086ef4a0c..64d2a6a8c2 100644
Binary files a/app/soapbox/reducers/search.js and b/app/soapbox/reducers/search.ts differ
diff --git a/app/soapbox/reducers/suggestions.js b/app/soapbox/reducers/suggestions.ts
similarity index 54%
rename from app/soapbox/reducers/suggestions.js
rename to app/soapbox/reducers/suggestions.ts
index ac00eecf11..bca64c9e27 100644
Binary files a/app/soapbox/reducers/suggestions.js and b/app/soapbox/reducers/suggestions.ts differ
diff --git a/app/soapbox/reducers/trending_statuses.js b/app/soapbox/reducers/trending_statuses.js
deleted file mode 100644
index ee4fa234b7..0000000000
Binary files a/app/soapbox/reducers/trending_statuses.js and /dev/null differ
diff --git a/app/soapbox/reducers/trending_statuses.ts b/app/soapbox/reducers/trending_statuses.ts
new file mode 100644
index 0000000000..afaf5d9af5
--- /dev/null
+++ b/app/soapbox/reducers/trending_statuses.ts
@@ -0,0 +1,37 @@
+import { Record as ImmutableRecord, OrderedSet as ImmutableOrderedSet } from 'immutable';
+
+import {
+ TRENDING_STATUSES_FETCH_REQUEST,
+ TRENDING_STATUSES_FETCH_SUCCESS,
+} from 'soapbox/actions/trending_statuses';
+
+import type { AnyAction } from 'redux';
+
+const ReducerRecord = ImmutableRecord({
+ items: ImmutableOrderedSet
(),
+ isLoading: false,
+});
+
+type State = ReturnType;
+
+type IdEntity = { id: string };
+
+const toIds = (items: IdEntity[]) => ImmutableOrderedSet(items.map(item => item.id));
+
+const importStatuses = (state: State, statuses: IdEntity[]): State => {
+ return state.withMutations(state => {
+ state.set('items', toIds(statuses));
+ state.set('isLoading', false);
+ });
+};
+
+export default function trending_statuses(state = ReducerRecord(), action: AnyAction) {
+ switch (action.type) {
+ case TRENDING_STATUSES_FETCH_REQUEST:
+ return state.set('isLoading', true);
+ case TRENDING_STATUSES_FETCH_SUCCESS:
+ return importStatuses(state, action.statuses);
+ default:
+ return state;
+ }
+}
diff --git a/app/soapbox/reducers/trends.js b/app/soapbox/reducers/trends.ts
similarity index 53%
rename from app/soapbox/reducers/trends.js
rename to app/soapbox/reducers/trends.ts
index eb7df59bfa..cb061c7b7e 100644
Binary files a/app/soapbox/reducers/trends.js and b/app/soapbox/reducers/trends.ts differ