Skip to content

Commit

Permalink
chore(webapp): geo distribution style
Browse files Browse the repository at this point in the history
  • Loading branch information
fvives99 committed Oct 24, 2022
1 parent 7e39e5a commit 6233c3e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
6 changes: 4 additions & 2 deletions webapp/src/components/GeoMap/styles.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default (theme) => ({
mapWrapper: {
backgroundColor: theme.palette.common.white,
marginTop: theme.spacing(3)
marginTop: theme.spacing(3),
},
goBackBtnHidden: {
display: 'none !important'
Expand All @@ -11,6 +11,8 @@ export default (theme) => ({
marginLeft: theme.spacing(1)
},
divRef: {
height: '100vh'
height: '100vh',
boxShadow: '0px 1px 5px rgba(0, 0, 0, 0.15)',

}
})
14 changes: 11 additions & 3 deletions webapp/src/routes/NodesDistribution/index.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
/* eslint camelcase: 0 */
import React, { lazy } from 'react'
import LinearProgress from '@mui/material/LinearProgress'
import { makeStyles } from '@mui/styles'

import useNodeDistributionState from '../../hooks/customHooks/useNodeDistributionState'

import styles from './styles'

const SearchBar = lazy(() => import('../../components/SearchBar'))
const GeoMap = lazy(() => import('../../components/GeoMap'))
const useStyles = makeStyles(styles)

const Nodes = () => {
const classes = useStyles()

const [{ filters, chips, nodes, loading }, { handleOnFiltersChange }] = useNodeDistributionState()

return (
<div>
<SearchBar
<>
<div className={`${classes.searchWrapper} ${classes.cardShadow}`}>
<SearchBar
filters={filters}
onChange={handleOnFiltersChange}
chips={chips}
translationScope="nodeSearchComponent"
/>
</div>
{loading && <LinearProgress />}
{!loading && <GeoMap data={nodes || []} />}
</div>
</>
)
}

Expand Down
12 changes: 12 additions & 0 deletions webapp/src/routes/NodesDistribution/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default (theme) => ({
cardShadow: {
boxShadow: '0px 1px 5px rgba(0, 0, 0, 0.15)',
},
searchWrapper: {
marginTop: theme.spacing(3),
marginBottom: theme.spacing(2),
'& .MuiGrid-root': {
paddingTop: '0px !important',
},
},
})

0 comments on commit 6233c3e

Please sign in to comment.