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
|
||||
</>
|
||||
),
|
||||
isComplete: twilio.validationSchema.isValidSync(accounts?.twilio) || R.isEmpty(accounts?.twilio)
|
||||
isComplete:
|
||||
twilio.validationSchema.isValidSync(accounts?.twilio) ||
|
||||
R.isEmpty(accounts?.twilio)
|
||||
},
|
||||
{
|
||||
namespace: namespaces.COMMISSIONS,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const useStyles = makeStyles(styles)
|
|||
|
||||
const GET_DATA = gql`
|
||||
query getData {
|
||||
config,
|
||||
config
|
||||
accounts
|
||||
}
|
||||
`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import Modal from 'src/components/Modal'
|
||||
|
||||
import { makeStyles, Drawer, Grid } from '@material-ui/core'
|
||||
import ClickAwayListener from '@material-ui/core/ClickAwayListener'
|
||||
import classnames from 'classnames'
|
||||
|
|
@ -7,11 +5,11 @@ import * as R from 'ramda'
|
|||
import React, { useState } from 'react'
|
||||
import { useHistory } from 'react-router-dom'
|
||||
|
||||
import Modal from 'src/components/Modal'
|
||||
import Stepper from 'src/components/Stepper'
|
||||
import { Button, Link } from 'src/components/buttons'
|
||||
import { P, H2, Info2 } from 'src/components/typography'
|
||||
import { spacer } from 'src/styling/variables'
|
||||
import { URI } from 'src/utils/apollo'
|
||||
|
||||
const getStepperProps = (current, steps) => ({
|
||||
steps: R.length(steps),
|
||||
|
|
@ -35,7 +33,7 @@ const useStyles = makeStyles(() => ({
|
|||
height: 84
|
||||
},
|
||||
title: {
|
||||
margin: [[0, spacer * 4, 0, 0]],
|
||||
margin: [[0, spacer * 4, 0, 0]]
|
||||
},
|
||||
subtitle: {
|
||||
marginTop: spacer,
|
||||
|
|
@ -45,8 +43,8 @@ const useStyles = makeStyles(() => ({
|
|||
},
|
||||
modal: {
|
||||
background: 'none',
|
||||
boxShadow: 'none',
|
||||
},
|
||||
boxShadow: 'none'
|
||||
}
|
||||
}))
|
||||
|
||||
function Footer({ next, current, steps: collection, path, tag, p }) {
|
||||
|
|
@ -82,7 +80,7 @@ function Footer({ next, current, steps: collection, path, tag, p }) {
|
|||
item
|
||||
xs={5}
|
||||
container
|
||||
direction={open ? "column" : "row"}
|
||||
direction={open ? 'column' : 'row'}
|
||||
justify="flex-start"
|
||||
alignItems="baseline">
|
||||
<H2 className={classes.title}>Setup Lamassu Admin</H2>
|
||||
|
|
@ -117,7 +115,12 @@ function Footer({ next, current, steps: collection, path, tag, p }) {
|
|||
direction="column"
|
||||
justify="flex-start"
|
||||
alignItems="flex-start">
|
||||
<Link onClick={() => { setFullExample(true) }}>See full example</Link>
|
||||
<Link
|
||||
onClick={() => {
|
||||
setFullExample(true)
|
||||
}}>
|
||||
See full example
|
||||
</Link>
|
||||
</Grid>
|
||||
<Grid
|
||||
item
|
||||
|
|
@ -142,9 +145,15 @@ function Footer({ next, current, steps: collection, path, tag, p }) {
|
|||
className={classes.modal}
|
||||
xl={true}
|
||||
width={1152 + 120 + 56}
|
||||
handleClose={() => { setFullExample(false) }}
|
||||
handleClose={() => {
|
||||
setFullExample(false)
|
||||
}}
|
||||
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>
|
||||
</Drawer>
|
||||
</ClickAwayListener>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ import classnames from 'classnames'
|
|||
import gql from 'graphql-tag'
|
||||
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 addMachineStyles from 'src/pages/AddMachine/styles'
|
||||
import {
|
||||
|
|
@ -12,12 +15,9 @@ import {
|
|||
} from 'src/pages/OperatorInfo/OperatorInfo.styles'
|
||||
import FormRenderer from 'src/pages/Services/FormRenderer'
|
||||
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 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 WarningIcon } from 'src/styling/icons/warning-icon/comet.svg'
|
||||
|
||||
const GET_CONFIG = gql`
|
||||
{
|
||||
|
|
@ -54,7 +54,7 @@ const options = [
|
|||
},
|
||||
{
|
||||
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 [saveAccounts] = useMutation(SAVE_ACCOUNTS)
|
||||
const accounts = data?.accounts ?? []
|
||||
const config = data?.config ?? []
|
||||
|
||||
const [enable, setEnable] = useState('disable')
|
||||
|
||||
|
|
@ -100,13 +99,18 @@ function Twilio({ dispatch, namespace }) {
|
|||
<H1>Twilio (SMS service)</H1>
|
||||
<H4>
|
||||
Will you setup a two way machine?
|
||||
<Tooltip width={304} enableClick Button={IconButton} Icon={HelpIcon}>
|
||||
<Tooltip width={304} enableClick Button={IconButton} Icon={HelpIcon}>
|
||||
<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>
|
||||
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>
|
||||
|
||||
</H4>
|
||||
|
||||
<RadioGroup
|
||||
|
|
@ -117,13 +121,12 @@ function Twilio({ dispatch, namespace }) {
|
|||
onChange={event => handleRadio(event.target.value)}
|
||||
/>
|
||||
|
||||
|
||||
<div className={classnames(classes.section, classes.infoMessage)}>
|
||||
<WarningIcon />
|
||||
<Label1>
|
||||
Before configuring Twilio, create an account and phone number to use
|
||||
the Admin.
|
||||
</Label1>
|
||||
</Label1>
|
||||
</div>
|
||||
{enable === 'enable' && (
|
||||
<FormRenderer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue