Commit 374cc361 authored by Ian Lapham's avatar Ian Lapham Committed by GitHub

small bg fixes (#1868)

parent 0198d0ba
...@@ -2,7 +2,7 @@ import React from 'react' ...@@ -2,7 +2,7 @@ import React from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { darken } from 'polished' import { darken } from 'polished'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { NavLink, Link as HistoryLink } from 'react-router-dom' import { NavLink, Link as HistoryLink, useLocation } from 'react-router-dom'
import { Percent } from '@uniswap/sdk-core' import { Percent } from '@uniswap/sdk-core'
import { ArrowLeft } from 'react-feather' import { ArrowLeft } from 'react-feather'
...@@ -90,24 +90,29 @@ export function FindPoolTabs({ origin }: { origin: string }) { ...@@ -90,24 +90,29 @@ export function FindPoolTabs({ origin }: { origin: string }) {
export function AddRemoveTabs({ export function AddRemoveTabs({
adding, adding,
creating, creating,
positionID,
defaultSlippage, defaultSlippage,
positionID,
}: { }: {
adding: boolean adding: boolean
creating: boolean creating: boolean
positionID?: string | undefined
defaultSlippage: Percent defaultSlippage: Percent
positionID?: string | undefined
}) { }) {
const theme = useTheme() const theme = useTheme()
// reset states on back // reset states on back
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const location = useLocation()
// detect if back should redirect to v3 or v2 pool page
const poolLink = location.pathname.includes('add/v2')
? '/pool/v2'
: '/pool' + (!!positionID ? `/${positionID.toString()}` : '')
return ( return (
<Tabs> <Tabs>
<RowBetween style={{ padding: '1rem 1rem 0 1rem' }}> <RowBetween style={{ padding: '1rem 1rem 0 1rem' }}>
<HistoryLink <HistoryLink
to={'/pool' + (!!positionID ? `/${positionID.toString()}` : '')} to={poolLink}
onClick={() => { onClick={() => {
if (adding) { if (adding) {
// not 100% sure both of these are needed // not 100% sure both of these are needed
......
...@@ -720,8 +720,6 @@ export default function AddLiquidity({ ...@@ -720,8 +720,6 @@ export default function AddLiquidity({
<RowBetween> <RowBetween>
{showApprovalA && ( {showApprovalA && (
<ButtonPrimary <ButtonPrimary
borderRadius="12px"
padding={'12px'}
onClick={approveACallback} onClick={approveACallback}
disabled={approvalA === ApprovalState.PENDING} disabled={approvalA === ApprovalState.PENDING}
width={showApprovalB ? '48%' : '100%'} width={showApprovalB ? '48%' : '100%'}
...@@ -737,8 +735,6 @@ export default function AddLiquidity({ ...@@ -737,8 +735,6 @@ export default function AddLiquidity({
)} )}
{showApprovalB && ( {showApprovalB && (
<ButtonPrimary <ButtonPrimary
borderRadius="12px"
padding={'12px'}
onClick={approveBCallback} onClick={approveBCallback}
disabled={approvalB === ApprovalState.PENDING} disabled={approvalB === ApprovalState.PENDING}
width={showApprovalA ? '48%' : '100%'} width={showApprovalA ? '48%' : '100%'}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment