Skip to content

Commit

Permalink
refactor(webapp): removed box component
Browse files Browse the repository at this point in the history
  • Loading branch information
fvives99 committed Oct 19, 2022
1 parent 87aa8f9 commit f3b984d
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions webapp/src/components/NetworkSelector/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import clsx from 'clsx'
import Box from '@mui/material/Box'
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
import ExpandLessIcon from '@mui/icons-material/ExpandLess'
import Typography from '@mui/material/Typography'
Expand Down Expand Up @@ -100,25 +99,25 @@ const NetworkSelector = ({ title, options, networkLogo }) => {
}, [options])

return (
<Box className={classes.dropdown}>
<Box onClick={toggleDropdown} className={clsx(classes.toggle)}>
<div className={classes.dropdown}>
<div onClick={toggleDropdown} className={clsx(classes.toggle)}>
{!open && <ExpandMoreIcon className={classes.expandIcon} />}
{open && <ExpandLessIcon className={classes.expandIcon} />}
<Typography component="p" variant="h5">
{title}
</Typography>
</Box>
<Box className={clsx(classes.list, { [classes.listActive]: open })}>
<Box className="titles">
<Box className="titlesBoxLeft">
</div>
<div className={clsx(classes.list, { [classes.listActive]: open })}>
<div className="titles">
<div className="titlesBoxLeft">
<Typography>Mainnets</Typography>
</Box>
<Box className="titlesBoxRight">
</div>
<div className="titlesBoxRight">
<Typography>Testnets</Typography>
</Box>
</Box>
<Box className="lists">
<Box className="listsBoxLeft">
</div>
</div>
<div className="lists">
<div className="listsBoxLeft">
<ul>
{networks.mainnet.map((option, i) => (
<li
Expand All @@ -134,8 +133,8 @@ const NetworkSelector = ({ title, options, networkLogo }) => {
</li>
))}
</ul>
</Box>
<Box className="listsBoxRight">
</div>
<div className="listsBoxRight">
<ul>
{networks.testnet.map((option, i) => (
<li
Expand All @@ -151,13 +150,13 @@ const NetworkSelector = ({ title, options, networkLogo }) => {
</li>
))}
</ul>
</Box>
</Box>
</Box>
<Box className={classes.networkLogo}>
</div>
</div>
</div>
<div className={classes.networkLogo}>
<img src={networkLogo} alt="network logo" />
</Box>
</Box>
</div>
</div>
)
}

Expand Down

0 comments on commit f3b984d

Please sign in to comment.