fix build error

This commit is contained in:
fmtabbara
2021-07-28 13:52:24 +01:00
parent bc68513a78
commit 30a78df986
7 changed files with 41 additions and 47 deletions
+1 -5
View File
@@ -179,11 +179,7 @@ export default function MainNav() {
Nym
</Typography>
<div style={{ marginLeft: 'auto' }}>
<Button
variant="outlined"
onClick={() => setClient(null)}
endIcon={<ExitToApp />}
>
<Button variant="outlined" onClick={() => setClient(null)}>
Log out
</Button>
</div>
+8 -8
View File
@@ -27,7 +27,7 @@ const BondNode = () => {
const router = useRouter()
const { client } = useContext(ValidatorClientContext)
const [isLoading, setIsLoading] = React.useState(false)
const [isLoading, setIsLoading] = React.useState<boolean>()
const [bondingError, setBondingError] = React.useState(null)
const [checkedOwnership, setCheckedOwnership] = React.useState(false)
@@ -111,7 +111,7 @@ const BondNode = () => {
<Typography gutterBottom>
You have already have a bonded mixnode. If you wish to bond a
different one, you need to first{' '}
<Link href='/unbond'>unbond the existing one</Link>.
<Link href="/unbond">unbond the existing one</Link>.
</Typography>
</Grid>
</Grid>
@@ -126,7 +126,7 @@ const BondNode = () => {
<Typography gutterBottom>
You have already have a bonded gateway. If you wish to bond a
different one, you need to first{' '}
<Link href='/unbond'>unbond the existing one</Link>.
<Link href="/unbond">unbond the existing one</Link>.
</Typography>
</Grid>
</Grid>
@@ -134,7 +134,7 @@ const BondNode = () => {
}
// we haven't clicked bond button yet
if (!isLoading) {
if (isLoading === undefined) {
return (
<>
<NodeTypeChooser nodeType={nodeType} setNodeType={setNodeType} />
@@ -164,11 +164,11 @@ const BondNode = () => {
<>
<main className={classes.layout}>
<Paper className={classes.paper}>
<ExecFeeNotice name='bonding' />
<ExecFeeNotice name="bonding" />
<Typography
component='h1'
variant='h4'
align='center'
component="h1"
variant="h4"
align="center"
className={classes.wrapper}
>
Bond a {nodeType}
@@ -21,7 +21,7 @@ const DelegateToNode = () => {
const router = useRouter()
const { client } = useContext(ValidatorClientContext)
const [isLoading, setIsLoading] = React.useState(false)
const [isLoading, setIsLoading] = React.useState<boolean>()
const [delegationError, setDelegationError] = React.useState(null)
const [nodeType, setNodeType] = React.useState(NodeType.Mixnode)
@@ -79,7 +79,7 @@ const DelegateToNode = () => {
}
// we haven't clicked delegate button yet
if (!isLoading) {
if (isLoading === undefined) {
return (
<>
<NodeTypeChooser nodeType={nodeType} setNodeType={setNodeType} />
@@ -106,9 +106,9 @@ const DelegateToNode = () => {
<Paper className={classes.paper}>
<ExecFeeNotice name={'delegating stake'} />
<Typography
component='h1'
variant='h4'
align='center'
component="h1"
variant="h4"
align="center"
className={classes.wrapper}
>
Delegate to {nodeType}
@@ -75,7 +75,6 @@ const DelegationCheck = () => {
}
const getDelegationCheckContent = () => {
console.log(isLoading)
// we're not signed in
if (client === null) {
return <NoClientError />
@@ -88,7 +87,7 @@ const DelegationCheck = () => {
<NodeTypeChooser nodeType={nodeType} setNodeType={setNodeType} />
<NodeIdentityForm
onSubmit={checkDelegation}
buttonText='Check stake value'
buttonText="Check stake value"
/>
</>
)
@@ -112,9 +111,9 @@ const DelegationCheck = () => {
<main className={classes.layout}>
<Paper className={classes.paper}>
<Typography
component='h1'
variant='h4'
align='center'
component="h1"
variant="h4"
align="center"
className={classes.wrapper}
>
Check your stake on a {nodeType}
+5 -5
View File
@@ -16,7 +16,7 @@ const UnbondNode = () => {
const router = useRouter()
const { client } = useContext(ValidatorClientContext)
const [isLoading, setIsLoading] = React.useState(false)
const [isLoading, setIsLoading] = React.useState<boolean>()
const [unbondingError, setUnbondingError] = React.useState(null)
const [checkedOwnership, setCheckedOwnership] = React.useState(false)
@@ -104,7 +104,7 @@ const UnbondNode = () => {
}
// we haven't clicked unbond button yet
if (!isLoading) {
if (isLoading === undefined) {
return <UnbondNotice onClick={unbondNode} />
}
@@ -131,9 +131,9 @@ const UnbondNode = () => {
<Paper className={classes.paper}>
<ExecFeeNotice name={'unbonding'} />
<Typography
component='h1'
variant='h4'
align='center'
component="h1"
variant="h4"
align="center"
className={classes.wrapper}
>
Unbond a {headerText}
@@ -1,4 +1,4 @@
import React, { useContext, useEffect } from 'react'
import React, { useContext, useEffect, useState } from 'react'
import { Paper } from '@material-ui/core'
import Typography from '@material-ui/core/Typography'
import { useRouter } from 'next/router'
@@ -17,7 +17,7 @@ const UndelegateFromNode = () => {
const router = useRouter()
const { client } = useContext(ValidatorClientContext)
const [isLoading, setIsLoading] = React.useState(false)
const [isLoading, setIsLoading] = React.useState<boolean>()
const [undelegationError, setUndelegationError] = React.useState(null)
const [nodeType, setNodeType] = React.useState(NodeType.Mixnode)
@@ -65,15 +65,15 @@ const UndelegateFromNode = () => {
}
// we haven't clicked undelegate button yet
if (!undelegationStarted) {
if (isLoading === undefined) {
return (
<React.Fragment>
<>
<NodeTypeChooser nodeType={nodeType} setNodeType={setNodeType} />
<NodeIdentityForm
onSubmit={undelegateFromNode}
buttonText={'Remove delegation'}
/>
</React.Fragment>
</>
)
}
@@ -95,9 +95,9 @@ const UndelegateFromNode = () => {
<Paper className={classes.paper}>
<ExecFeeNotice name={'undelegating stake'} />
<Typography
component='h1'
variant='h4'
align='center'
component="h1"
variant="h4"
align="center"
className={classes.wrapper}
>
Undelegate stake from {nodeType}
+10 -11
View File
@@ -80,9 +80,9 @@ export default function SendFunds() {
return (
<Confirmation
isLoading={isLoading}
progressMessage='Funds transfer is in progress...'
progressMessage="Funds transfer is in progress..."
successMessage={successMessage}
failureMessage='Failed to complete the transfer'
failureMessage="Failed to complete the transfer"
error={sendingError}
/>
)
@@ -200,16 +200,16 @@ export default function SendFunds() {
<>
{activeStep === steps.length ? (
<>
<Typography variant='h5' gutterBottom>
<Typography variant="h5" gutterBottom>
Payment complete.
</Typography>
<Typography variant='subtitle1'>
<Typography variant="subtitle1">
You (<b>{transaction.sender}</b>)
</Typography>
<Typography variant='subtitle1'>
<Typography variant="subtitle1">
have sent <b>{printableCoin(transaction.coin)}</b>
</Typography>
<Typography variant='subtitle1'>
<Typography variant="subtitle1">
to <b>{transaction.recipient}</b>.
</Typography>
</>
@@ -224,9 +224,9 @@ export default function SendFunds() {
</Button>
)}
<Button
variant='contained'
color='primary'
type='submit'
variant="contained"
color="primary"
type="submit"
disabled={checkButtonDisabled()}
className={classes.button}
>
@@ -250,10 +250,9 @@ export default function SendFunds() {
<MainNav />
<main className={classes.layout}>
<Paper className={classes.paper}>
<Typography component='h1' variant='h4' align='center'>
<Typography component="h1" variant="h4" align="center">
Send Nym
</Typography>
{client === null ? <NoClientError /> : getStepperContent()}
</Paper>
</main>