Skip to content

Commit

Permalink
back button now goes to main page (#1348)
Browse files Browse the repository at this point in the history
Co-authored-by: Milan Rasovic <ezo@Milans-MacBook-Pro.local>
  • Loading branch information
Mi-Lan and Milan Rasovic committed Nov 13, 2020
1 parent 9f4b4d7 commit c209aff
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ItemTypes, gtcrEncode } from '@kleros/gtcr-encoder'
import { abi as _GeneralizedTCR } from '@kleros/tcr/build/contracts/GeneralizedTCR.json'
import { ethers } from 'ethers'
import React, { useCallback, useMemo, useState } from 'react'
import { RouteComponentProps, withRouter } from 'react-router-dom'
import { RouteComponentProps, useHistory, withRouter } from 'react-router-dom'
import styled from 'styled-components'

import { ConnectedWeb3Context } from '../../../../hooks'
Expand Down Expand Up @@ -112,9 +112,10 @@ interface Props extends RouteComponentProps<any> {
}

const MarketVerifyWrapper: React.FC<Props> = (props: Props) => {
const { context, marketMakerData, switchMarketTab } = props || {}
const { context, marketMakerData } = props || {}
const [selection, setSelection] = useState<number | undefined>()
const { data, error, status } = useKlerosCuration(marketMakerData, context)
const history = useHistory()

const selectSource = useCallback(
(value: number) => {
Expand Down Expand Up @@ -176,7 +177,7 @@ const MarketVerifyWrapper: React.FC<Props> = (props: Props) => {
</>
)}
<BottomButtonWrapper>
<Button buttonType={ButtonType.secondaryLine} onClick={() => switchMarketTab('SWAP')}>
<Button buttonType={ButtonType.secondaryLine} onClick={() => history.goBack()}>
Back
</Button>
<Button
Expand Down

0 comments on commit c209aff

Please sign in to comment.