Fix endless loader in module settings (#2300)

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
This commit is contained in:
katspaugh 2021-05-18 17:46:21 +02:00 committed by GitHub
parent 3f66ebd2a4
commit f9e6da4ffe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
import { Loader, Text, theme, Title } from '@gnosis.pm/safe-react-components'
import { Text, theme, Title } from '@gnosis.pm/safe-react-components'
import { makeStyles } from '@material-ui/core/styles'
import React, { useEffect } from 'react'
import { useSelector } from 'react-redux'
@ -28,16 +28,6 @@ const NoModuleLegend = (): React.ReactElement => (
</InfoText>
)
const LoadingModules = (): React.ReactElement => {
const classes = useStyles()
return (
<Block className={classes.container}>
<Loader size="md" />
</Block>
)
}
export const Advanced = (): React.ReactElement => {
const classes = useStyles()
const nonce = useSelector(safeNonceSelector)
@ -83,13 +73,7 @@ export const Advanced = (): React.ReactElement => {
.
</InfoText>
{!moduleData ? (
<NoModuleLegend />
) : moduleData?.length === 0 ? (
<LoadingModules />
) : (
<ModulesTable moduleData={moduleData} />
)}
{!moduleData || !moduleData.length ? <NoModuleLegend /> : <ModulesTable moduleData={moduleData} />}
</Block>
</>
)