-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continue the work on cross-site / cross-paratime search
- Loading branch information
Showing
18 changed files
with
421 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/app/pages/SearchResultsPage/GlobalSearchResultsView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { FC } from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
|
||
import { getFilterForScope, getKeyForScope, getNameForScope } from '../../../types/searchScope' | ||
import { RouteUtils } from '../../utils/route-utils' | ||
import { SearchResults } from './hooks' | ||
import { NoResults } from './NoResults' | ||
import { SearchResultsFiltered } from './SearchResultsFiltered' | ||
import { useGetRosePrice } from '../../../coin-gecko/api' | ||
|
||
export const GlobalSearchResultsView: FC<{ searchResults: SearchResults }> = ({ searchResults }) => { | ||
const { t } = useTranslation() | ||
const roseFiatValue = useGetRosePrice().data | ||
return searchResults.allResults.length === 0 ? ( | ||
<NoResults /> | ||
) : ( | ||
<> | ||
{RouteUtils.getEnabledSearchScopes().map(scope => ( | ||
<SearchResultsFiltered | ||
key={getKeyForScope(scope)} | ||
title={getNameForScope(t, scope)} | ||
filter={getFilterForScope(scope)} | ||
searchResults={searchResults} | ||
networkForTheme={scope.network} | ||
roseFiatValue={roseFiatValue} | ||
/> | ||
))} | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
112 changes: 0 additions & 112 deletions
112
src/app/pages/SearchResultsPage/ResultsFilteredThemed.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.