-
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
20 changed files
with
447 additions
and
378 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
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,32 @@ | ||
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 { AllTokenPrices } from '../../../coin-gecko/api' | ||
|
||
export const GlobalSearchResultsView: FC<{ searchResults: SearchResults; tokenPrices: AllTokenPrices }> = ({ | ||
searchResults, | ||
tokenPrices, | ||
}) => { | ||
const { t } = useTranslation() | ||
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} | ||
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,35 @@ | ||
import Box from '@mui/material/Box' | ||
import { styled } from '@mui/material/styles' | ||
import useMediaQuery from '@mui/material/useMediaQuery' | ||
|
||
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)', | ||
'&& .MuiCard-root': { | ||
borderTopLeftRadius: 0, | ||
borderTopRightRadius: 0, | ||
paddingLeft: 64, | ||
paddingRight: 64, | ||
background: theme.palette.layout.networkBubbleBackground, | ||
}, | ||
'&& .MuiCard-root > .MuiBox-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.