Skip to content

Commit

Permalink
Supported networks design fixes (#620)
Browse files Browse the repository at this point in the history
* Create unified supported networks page

* Edit generation script

* Replace existing supported network pages by links to the new one

* Add redirections

* Implement requested changes

* Generate separate API references per network

* Use prettier instead of numso.prettier-standard

* Use typed script to generate API reference

* Fix generate api reference script

* Fix generate supported networks script

* Re-generate supported networks

* Re-generate API reference

* Fix lazy loading

* Unsplit and and fix addresses margins
  • Loading branch information
louis-md authored Oct 17, 2024
1 parent 904a833 commit d9ecd96
Show file tree
Hide file tree
Showing 5 changed files with 288 additions and 288 deletions.
10 changes: 8 additions & 2 deletions components/ResourceHub/Resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,20 @@ export const Resources: React.FC = () => {
alignItems='center'
justifyContent='center'
>
<Typography textAlign='center' variant='h1' mb={[2, 0]}>
<Typography textAlign='center' variant='h1' fontSize='42px' mb={4}>
Resource Hub
</Typography>
<TextField
className={css.searchField}
variant='outlined'
placeholder='Search by name, description, or tag'
InputProps={{
style: {
color: 'white',
backgroundColor: 'rgba(28, 28, 28, 1)',
borderRadius: '8px',
border: 'none'
},
startAdornment: (
<InputAdornment position='start'>
<SearchIcon />
Expand All @@ -357,7 +363,7 @@ export const Resources: React.FC = () => {
) : undefined
}}
value={searchQuery}
sx={{ border: 'none', width: '80%', mt: [2, 0] }}
sx={{ border: 'none', width: ['80%', '500px'], mt: [2, 0] }}
onChange={e => {
if (e.target.value.length === 0) onResetSearch()
else setSelectedFilter([e.target.value], 'search')
Expand Down
20 changes: 12 additions & 8 deletions components/SupportedNetworks/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,16 @@ const NetworkCard = (network: Network): JSX.Element => {
}}
className={css.card}
onClick={() => {
void push({
query: {
...query,
expand: network.chainId
}
})
void push(
{
query: {
...query,
expand: network.chainId
}
},
undefined,
{ scroll: false }
)
// sendGAEvent('event', 'supported_networks_link', {
// network_chainId: network.chainId,
// network_name: network.name
Expand Down Expand Up @@ -104,7 +108,7 @@ const NetworkCard = (network: Network): JSX.Element => {
height: '23px',
fontSize: '14px',
cursor: 'pointer',
ml: 1
mr: 1
}}
className={css.chip}
label={version}
Expand All @@ -131,7 +135,7 @@ const NetworkCard = (network: Network): JSX.Element => {
height: '23px',
fontSize: '14px',
cursor: 'pointer',
ml: 1
mr: 1
}}
className={css.chip}
label={feature}
Expand Down
Loading

0 comments on commit d9ecd96

Please sign in to comment.