-
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.
Merge pull request #449 from oasisprotocol/csillag/cross-chain-search…
…-reloaded Continue the work on cross-network / cross-paratime search
- Loading branch information
Showing
23 changed files
with
490 additions
and
422 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
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,31 @@ | ||
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 { SearchResultsList } from './SearchResultsList' | ||
import { AllTokenPrices } from '../../../coin-gecko/api' | ||
|
||
export const GlobalSearchResultsView: FC<{ searchResults: SearchResults; tokenPrices: AllTokenPrices }> = ({ | ||
searchResults, | ||
tokenPrices, | ||
}) => { | ||
const { t } = useTranslation() | ||
return searchResults.length === 0 ? ( | ||
<NoResults /> | ||
) : ( | ||
<> | ||
{RouteUtils.getEnabledSearchScopes().map(scope => ( | ||
<SearchResultsList | ||
key={getKeyForScope(scope)} | ||
title={getNameForScope(t, scope)} | ||
searchResults={searchResults.filter(getFilterForScope(scope))} | ||
networkForTheme={scope.network} | ||
tokenPrices={tokenPrices} | ||
/> | ||
))} | ||
</> | ||
) | ||
} |
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 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,37 @@ | ||
import Box from '@mui/material/Box' | ||
import { styled } from '@mui/material/styles' | ||
import useMediaQuery from '@mui/material/useMediaQuery' | ||
import { cardClasses } from '@mui/material/Card' | ||
import { boxClasses } from '../../utils/mui-helpers' | ||
|
||
export const ResultListFrame = styled(Box)(({ theme }) => { | ||
const isMobile = useMediaQuery(theme.breakpoints.down('sm')) | ||
return { | ||
marginBottom: 20, | ||
border: isMobile ? 'none' : `solid 15px ${theme.palette.layout.networkBubbleBorder}`, | ||
background: theme.palette.layout.networkBubbleBackground, | ||
borderRadius: 12, | ||
boxShadow: '-20px 4px 40px rgba(34, 47, 63, 0.24)', | ||
[`&& .{cardClasses.root}`]: { | ||
borderTopLeftRadius: 0, | ||
borderTopRightRadius: 0, | ||
paddingLeft: 64, | ||
paddingRight: 64, | ||
background: theme.palette.layout.networkBubbleBackground, | ||
}, | ||
[`&& .${cardClasses.root}. > .${boxClasses.root}`]: { | ||
background: theme.palette.layout.networkBubbleBorder, | ||
borderRadius: 0, | ||
marginLeft: -64, | ||
marginTop: -32, | ||
marginRight: -64, | ||
paddingLeft: 64, | ||
paddingRight: 64, | ||
paddingBottom: 32, | ||
paddingTop: 32, | ||
}, | ||
'&& dt, && dd': { | ||
boxShadow: `0px 1px 0px ${theme.palette.layout.descriptionListSeparator}`, | ||
}, | ||
} | ||
}) |
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
117 changes: 0 additions & 117 deletions
117
src/app/pages/SearchResultsPage/ResultsOnForeignNetworkThemed.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
src/app/pages/SearchResultsPage/ResultsOnNetworkThemed.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.