From 88404f32b6526329b2d8f492f0ac8f7c1842811e Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 14 May 2022 13:18:31 -0500 Subject: [PATCH] Search reducer: convert to TypeScript --- .../compose/components/search_results.tsx | 8 ++++---- app/soapbox/reducers/{search.js => search.ts} | Bin 3177 -> 3741 bytes 2 files changed, 4 insertions(+), 4 deletions(-) rename app/soapbox/reducers/{search.js => search.ts} (69%) diff --git a/app/soapbox/features/compose/components/search_results.tsx b/app/soapbox/features/compose/components/search_results.tsx index d24c7631d3..d3fa555fad 100644 --- a/app/soapbox/features/compose/components/search_results.tsx +++ b/app/soapbox/features/compose/components/search_results.tsx @@ -46,13 +46,13 @@ const SearchResults: React.FC = () => { const intl = useIntl(); const dispatch = useAppDispatch(); - const value = useAppSelector(state => state.search.get('submittedValue')); - const results = useAppSelector(state => state.search.get('results')); + const value = useAppSelector(state => state.search.submittedValue); + const results = useAppSelector(state => state.search.results); const suggestions = useAppSelector(state => state.suggestions.items); const trendingStatuses = useAppSelector(state => state.trending_statuses.items); const trends = useAppSelector(state => state.trends.items); - const submitted = useAppSelector(state => state.search.get('submitted')); - const selectedFilter = useAppSelector(state => state.search.get('filter')); + const submitted = useAppSelector(state => state.search.submitted); + const selectedFilter = useAppSelector(state => state.search.filter); const handleLoadMore = () => dispatch(expandSearch(selectedFilter)); const handleSelectFilter = (newActiveFilter: SearchFilter) => dispatch(setFilter(newActiveFilter)); 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 e086ef4a0c6c8cdb82525d99874329e65d4f39a5..f315cbb90a1f72c4747638e53c8b97570bb4a5ba 100644 GIT binary patch delta 852 zcma))J#Q015QcS!B7;#xkp>}|j6`v^bR^UlCrSz=4kdtWBnpJY=5Ax3Ftv|;*nHwD^f}(c${c#g^WOf550RgDSW16`grVjKRVI-8+3U|L6A89?p$@|D?Q4O!Qxti%P?C$z>jrOSF*D8tye zZ1of5ss0-@D30CNCjr={_@K&;4AQpdgD$7zDy;`^G@6(So9PD?Wp(LpIS-mcF@N5# zxI1;vJ1Lv@n-sdG!Rptwx6V}~mF=3v|20@QQe3*jjW=wT@zuADb7ymR7YO_Hc{u*Wce-%UI<%e!71Edh#e3 delta 299 zcmbO$`%*$SGq)hWs6?S!!8fr$A+cD&GdH)iBrz!`70B0_7_Q8rkXDqR>lLi9vDKeZ zF*!f4xI`f{FS8^wF(pv3HD6J$)22cKrAwOGiLyYjzU>tPAS-?%lycm(NRd8EXdu< MgDkdrE%yf|04z{yMgRZ+