feat: updated the postage stamps page design (#217)

* feat: updated the settings page design

* chore: removed unused dependencies
This commit is contained in:
Vojtech Simetka
2021-10-07 12:22:46 +02:00
committed by GitHub
parent 32e5ea9e56
commit f241b2fc5f
3 changed files with 15 additions and 61 deletions
+2 -19
View File
@@ -1,26 +1,21 @@
import { ReactElement, useContext, useEffect } from 'react'
import { Theme, createStyles, makeStyles } from '@material-ui/core/styles'
import { createStyles, makeStyles } from '@material-ui/core/styles'
import { Container, CircularProgress } from '@material-ui/core'
import StampsTable from './StampsTable'
import TroubleshootConnectionCard from '../../components/TroubleshootConnectionCard'
import CreatePostageStampModal from './CreatePostageStampModal'
import { Context } from '../../providers/Stamps'
import { Context as BeeContext } from '../../providers/Bee'
const useStyles = makeStyles((theme: Theme) =>
const useStyles = makeStyles(() =>
createStyles({
root: {
width: '100%',
display: 'grid',
rowGap: theme.spacing(2),
},
actions: {
display: 'flex',
width: '100%',
columnGap: theme.spacing(1),
rowGap: theme.spacing(1),
flex: '0 1 auto',
flexWrap: 'wrap',
alignItems: 'center',
@@ -30,8 +25,6 @@ const useStyles = makeStyles((theme: Theme) =>
export default function Accounting(): ReactElement {
const classes = useStyles()
const beeContext = useContext(BeeContext)
const { stamps, isLoading, error, start, stop } = useContext(Context)
useEffect(() => {
start()
@@ -39,16 +32,6 @@ export default function Accounting(): ReactElement {
return () => stop()
}, [])
if (beeContext.isLoading) {
return (
<Container style={{ textAlign: 'center', padding: '50px' }}>
<CircularProgress />
</Container>
)
}
if (!beeContext.status.all) return <TroubleshootConnectionCard />
return (
<div className={classes.root}>
{error && (