feat: sync and update with all changes from fork (#720)
* feat: sync and update with all changes from fork * refactor: extract clipboard copy logic into custom hook * fix: correct spelling of DEFAULT_REFRESH_FREQUENCY_MS in Stamps and WalletBalance providers * refactor(ui-tests): replace fixed sleeps with condition-based waits * fix: handle null values for size and granteeCount in infoGroups * fix(lint): add newline at end of file in useClipboardCopy hook * fix(ui-tests): page.goto URL * refactor: update import paths for useClipboardCopy --------- Co-authored-by: Ferenc Sárai <sarai.ferenc@gmail.com>
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import { Box, Grid, Typography } from '@material-ui/core'
|
||||
import { BeeModes } from '@ethersphere/bee-js'
|
||||
import { Box, Grid, Typography } from '@mui/material'
|
||||
import { useSnackbar } from 'notistack'
|
||||
import { ReactElement, useContext, useEffect } from 'react'
|
||||
import { useNavigate } from 'react-router'
|
||||
|
||||
import { ChainSync } from '../../components/ChainSync'
|
||||
import { Waiting } from '../../components/Waiting'
|
||||
import { Context } from '../../providers/Settings'
|
||||
import { ROUTES } from '../../routes'
|
||||
|
||||
const LIGHTMODE_START_INTERVAL_MS = 3_000
|
||||
|
||||
export default function LightModeRestart(): ReactElement {
|
||||
const navigate = useNavigate()
|
||||
const { enqueueSnackbar } = useSnackbar()
|
||||
@@ -27,8 +30,9 @@ export default function LightModeRestart(): ReactElement {
|
||||
navigate(ROUTES.INFO)
|
||||
}
|
||||
})
|
||||
.catch(console.error) // eslint-disable-line
|
||||
}, 3_000)
|
||||
// eslint-disable-next-line no-console
|
||||
.catch(console.error)
|
||||
}, LIGHTMODE_START_INTERVAL_MS)
|
||||
|
||||
return () => clearInterval(interval)
|
||||
}, [beeApi, enqueueSnackbar, navigate])
|
||||
|
||||
Reference in New Issue
Block a user