style: eslint fix
This commit is contained in:
parent
a7c1e3cf07
commit
edce075b18
4 changed files with 38 additions and 24 deletions
|
|
@ -100,7 +100,9 @@ const validateSteps = ({ config, accounts }) => {
|
||||||
compliance options
|
compliance options
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
isComplete: twilio.validationSchema.isValidSync(accounts?.twilio) || R.isEmpty(accounts?.twilio)
|
isComplete:
|
||||||
|
twilio.validationSchema.isValidSync(accounts?.twilio) ||
|
||||||
|
R.isEmpty(accounts?.twilio)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
namespace: namespaces.COMMISSIONS,
|
namespace: namespaces.COMMISSIONS,
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ const useStyles = makeStyles(styles)
|
||||||
|
|
||||||
const GET_DATA = gql`
|
const GET_DATA = gql`
|
||||||
query getData {
|
query getData {
|
||||||
config,
|
config
|
||||||
accounts
|
accounts
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
import Modal from 'src/components/Modal'
|
|
||||||
|
|
||||||
import { makeStyles, Drawer, Grid } from '@material-ui/core'
|
import { makeStyles, Drawer, Grid } from '@material-ui/core'
|
||||||
import ClickAwayListener from '@material-ui/core/ClickAwayListener'
|
import ClickAwayListener from '@material-ui/core/ClickAwayListener'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
|
|
@ -7,11 +5,11 @@ import * as R from 'ramda'
|
||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
import { useHistory } from 'react-router-dom'
|
import { useHistory } from 'react-router-dom'
|
||||||
|
|
||||||
|
import Modal from 'src/components/Modal'
|
||||||
import Stepper from 'src/components/Stepper'
|
import Stepper from 'src/components/Stepper'
|
||||||
import { Button, Link } from 'src/components/buttons'
|
import { Button, Link } from 'src/components/buttons'
|
||||||
import { P, H2, Info2 } from 'src/components/typography'
|
import { P, H2, Info2 } from 'src/components/typography'
|
||||||
import { spacer } from 'src/styling/variables'
|
import { spacer } from 'src/styling/variables'
|
||||||
import { URI } from 'src/utils/apollo'
|
|
||||||
|
|
||||||
const getStepperProps = (current, steps) => ({
|
const getStepperProps = (current, steps) => ({
|
||||||
steps: R.length(steps),
|
steps: R.length(steps),
|
||||||
|
|
@ -35,7 +33,7 @@ const useStyles = makeStyles(() => ({
|
||||||
height: 84
|
height: 84
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
margin: [[0, spacer * 4, 0, 0]],
|
margin: [[0, spacer * 4, 0, 0]]
|
||||||
},
|
},
|
||||||
subtitle: {
|
subtitle: {
|
||||||
marginTop: spacer,
|
marginTop: spacer,
|
||||||
|
|
@ -45,8 +43,8 @@ const useStyles = makeStyles(() => ({
|
||||||
},
|
},
|
||||||
modal: {
|
modal: {
|
||||||
background: 'none',
|
background: 'none',
|
||||||
boxShadow: 'none',
|
boxShadow: 'none'
|
||||||
},
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
function Footer({ next, current, steps: collection, path, tag, p }) {
|
function Footer({ next, current, steps: collection, path, tag, p }) {
|
||||||
|
|
@ -82,7 +80,7 @@ function Footer({ next, current, steps: collection, path, tag, p }) {
|
||||||
item
|
item
|
||||||
xs={5}
|
xs={5}
|
||||||
container
|
container
|
||||||
direction={open ? "column" : "row"}
|
direction={open ? 'column' : 'row'}
|
||||||
justify="flex-start"
|
justify="flex-start"
|
||||||
alignItems="baseline">
|
alignItems="baseline">
|
||||||
<H2 className={classes.title}>Setup Lamassu Admin</H2>
|
<H2 className={classes.title}>Setup Lamassu Admin</H2>
|
||||||
|
|
@ -117,7 +115,12 @@ function Footer({ next, current, steps: collection, path, tag, p }) {
|
||||||
direction="column"
|
direction="column"
|
||||||
justify="flex-start"
|
justify="flex-start"
|
||||||
alignItems="flex-start">
|
alignItems="flex-start">
|
||||||
<Link onClick={() => { setFullExample(true) }}>See full example</Link>
|
<Link
|
||||||
|
onClick={() => {
|
||||||
|
setFullExample(true)
|
||||||
|
}}>
|
||||||
|
See full example
|
||||||
|
</Link>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid
|
<Grid
|
||||||
item
|
item
|
||||||
|
|
@ -142,9 +145,15 @@ function Footer({ next, current, steps: collection, path, tag, p }) {
|
||||||
className={classes.modal}
|
className={classes.modal}
|
||||||
xl={true}
|
xl={true}
|
||||||
width={1152 + 120 + 56}
|
width={1152 + 120 + 56}
|
||||||
handleClose={() => { setFullExample(false) }}
|
handleClose={() => {
|
||||||
|
setFullExample(false)
|
||||||
|
}}
|
||||||
open={fullExample}>
|
open={fullExample}>
|
||||||
<img width={1152} src={`/fullexample.${current}.png`} alt={`${current} configuration example`} />
|
<img
|
||||||
|
width={1152}
|
||||||
|
src={`/fullexample.${current}.png`}
|
||||||
|
alt={`${current} configuration example`}
|
||||||
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
</Drawer>
|
</Drawer>
|
||||||
</ClickAwayListener>
|
</ClickAwayListener>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@ import classnames from 'classnames'
|
||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
|
|
||||||
|
import Tooltip from 'src/components/Tooltip'
|
||||||
|
import { IconButton } from 'src/components/buttons'
|
||||||
|
import { RadioGroup } from 'src/components/inputs'
|
||||||
import { H1, Label1, H4, P } from 'src/components/typography'
|
import { H1, Label1, H4, P } from 'src/components/typography'
|
||||||
import addMachineStyles from 'src/pages/AddMachine/styles'
|
import addMachineStyles from 'src/pages/AddMachine/styles'
|
||||||
import {
|
import {
|
||||||
|
|
@ -12,12 +15,9 @@ import {
|
||||||
} from 'src/pages/OperatorInfo/OperatorInfo.styles'
|
} from 'src/pages/OperatorInfo/OperatorInfo.styles'
|
||||||
import FormRenderer from 'src/pages/Services/FormRenderer'
|
import FormRenderer from 'src/pages/Services/FormRenderer'
|
||||||
import twilio from 'src/pages/Services/schemas/twilio'
|
import twilio from 'src/pages/Services/schemas/twilio'
|
||||||
import { ReactComponent as WarningIcon } from 'src/styling/icons/warning-icon/comet.svg'
|
|
||||||
import { RadioGroup } from 'src/components/inputs'
|
|
||||||
import styles from 'src/pages/Wizard/Radio.styles'
|
import styles from 'src/pages/Wizard/Radio.styles'
|
||||||
import Tooltip from 'src/components/Tooltip'
|
|
||||||
import { IconButton } from 'src/components/buttons'
|
|
||||||
import { ReactComponent as HelpIcon } from 'src/styling/icons/action/help/zodiac.svg'
|
import { ReactComponent as HelpIcon } from 'src/styling/icons/action/help/zodiac.svg'
|
||||||
|
import { ReactComponent as WarningIcon } from 'src/styling/icons/warning-icon/comet.svg'
|
||||||
|
|
||||||
const GET_CONFIG = gql`
|
const GET_CONFIG = gql`
|
||||||
{
|
{
|
||||||
|
|
@ -54,7 +54,7 @@ const options = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: 'disable',
|
code: 'disable',
|
||||||
display: "No, not for now"
|
display: 'No, not for now'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -62,7 +62,6 @@ function Twilio({ dispatch, namespace }) {
|
||||||
const { data, refetch } = useQuery(GET_CONFIG)
|
const { data, refetch } = useQuery(GET_CONFIG)
|
||||||
const [saveAccounts] = useMutation(SAVE_ACCOUNTS)
|
const [saveAccounts] = useMutation(SAVE_ACCOUNTS)
|
||||||
const accounts = data?.accounts ?? []
|
const accounts = data?.accounts ?? []
|
||||||
const config = data?.config ?? []
|
|
||||||
|
|
||||||
const [enable, setEnable] = useState('disable')
|
const [enable, setEnable] = useState('disable')
|
||||||
|
|
||||||
|
|
@ -100,13 +99,18 @@ function Twilio({ dispatch, namespace }) {
|
||||||
<H1>Twilio (SMS service)</H1>
|
<H1>Twilio (SMS service)</H1>
|
||||||
<H4>
|
<H4>
|
||||||
Will you setup a two way machine?
|
Will you setup a two way machine?
|
||||||
<Tooltip width={304} enableClick Button={IconButton} Icon={HelpIcon}>
|
<Tooltip width={304} enableClick Button={IconButton} Icon={HelpIcon}>
|
||||||
<P>
|
<P>
|
||||||
Two-way machines allow your customers not only to buy (cash-in) but also sell cryptocurrencies (cash-out).</P>
|
Two-way machines allow your customers not only to buy (cash-in)
|
||||||
|
but also sell cryptocurrencies (cash-out).
|
||||||
|
</P>
|
||||||
<P>
|
<P>
|
||||||
To get your admin up and running, you’ll only need an SMS service for cash-out transactions. If you’re using one-way machines, select “No” to skip this step for now. You can later set it up within the Lamassu Admin.</P>
|
To get your admin up and running, you’ll only need an SMS service
|
||||||
|
for cash-out transactions. If you’re using one-way machines,
|
||||||
|
select “No” to skip this step for now. You can later set it up
|
||||||
|
within the Lamassu Admin.
|
||||||
|
</P>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
</H4>
|
</H4>
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
|
|
@ -117,13 +121,12 @@ function Twilio({ dispatch, namespace }) {
|
||||||
onChange={event => handleRadio(event.target.value)}
|
onChange={event => handleRadio(event.target.value)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<div className={classnames(classes.section, classes.infoMessage)}>
|
<div className={classnames(classes.section, classes.infoMessage)}>
|
||||||
<WarningIcon />
|
<WarningIcon />
|
||||||
<Label1>
|
<Label1>
|
||||||
Before configuring Twilio, create an account and phone number to use
|
Before configuring Twilio, create an account and phone number to use
|
||||||
the Admin.
|
the Admin.
|
||||||
</Label1>
|
</Label1>
|
||||||
</div>
|
</div>
|
||||||
{enable === 'enable' && (
|
{enable === 'enable' && (
|
||||||
<FormRenderer
|
<FormRenderer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue