fix: wizard rework

This commit is contained in:
Taranto 2020-10-11 18:04:46 +01:00 committed by Josh Harvey
parent 0f4350f99c
commit 3a6f3a2915
40 changed files with 12622 additions and 9244 deletions

View file

@ -1,6 +1,5 @@
import { makeStyles } from '@material-ui/core'
import React, { useEffect } from 'react'
import { useHistory } from 'react-router-dom'
import React from 'react'
import { Button } from 'src/components/buttons'
import { H1, P } from 'src/components/typography'
@ -25,16 +24,9 @@ const styles = {
const useStyles = makeStyles(styles)
function Welcome({ dispatch }) {
function Welcome({ doContinue }) {
const classes = useStyles()
useEffect(() => {
dispatch({ type: 'wizard/SET_STEP', payload: 'welcome' })
}, [dispatch])
const history = useHistory()
const handleClick = () => history.push('/wizard/wallets')
return (
<div className={classes.welcome}>
<H1 className={classes.title}>Welcome to Lamassu Admin</H1>
@ -43,7 +35,7 @@ function Welcome({ dispatch }) {
<br />
help set up you need before start adding machines.
</P>
<Button size={'xl'} onClick={handleClick}>
<Button size="xl" onClick={doContinue}>
Get started
</Button>
</div>