Files
bee-dashboard/src/layout/Dashboard.tsx
T
Cafe137 a768b4ea06 feat: add light node upgrade top up methods (#372)
* feat: add top up

* chore: remove console.log

* build: add pseudo-missing dependency

* feat: add missing top up components

* fix: crypto route

* feat(wip): add gift wallet logic

* fix: fix gift wallet flows

* feat: simplify flow without fund step

* feat: add loading screens

* fix: remove alert

* fix: prepend http if needed

* fix: fix bug that was reintroduced with merge

* refactor: rename minusEther to minusBaseUnits

* fix: remove unused setStartedAt

* build: remove unused dependency
2022-06-02 09:28:43 +02:00

47 lines
1.1 KiB
TypeScript

import { CircularProgress, Container } from '@material-ui/core'
import { createStyles, makeStyles, Theme } from '@material-ui/core/styles'
import { ReactElement, useContext } from 'react'
import ErrorBoundary from '../components/ErrorBoundary'
import SideBar from '../components/SideBar'
import { Context } from '../providers/Bee'
const useStyles = makeStyles((theme: Theme) =>
createStyles({
content: {
backgroundColor: theme.palette.background.default,
minHeight: '100vh',
},
}),
)
interface Props {
children?: ReactElement
}
const Dashboard = (props: Props): ReactElement => {
const classes = useStyles()
const { isLoading } = useContext(Context)
return (
<div style={{ display: 'flex' }}>
<SideBar />
<Container className={classes.content}>
<ErrorBoundary>
<>
{isLoading ? (
<div style={{ textAlign: 'center', width: '100%' }}>
<CircularProgress />
</div>
) : (
props.children
)}
</>
</ErrorBoundary>
</Container>
</div>
)
}
export default Dashboard