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'
import styled from 'styled-components/macro'
import { darken } from 'polished'
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 { ArrowLeft } from 'react-feather'
......@@ -90,24 +90,29 @@ export function FindPoolTabs({ origin }: { origin: string }) {
export function AddRemoveTabs({
adding,
creating,
positionID,
defaultSlippage,
positionID,
}: {
adding: boolean
creating: boolean
positionID?: string | undefined
defaultSlippage: Percent
positionID?: string | undefined
}) {
const theme = useTheme()
// reset states on back
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 (
<Tabs>
<RowBetween style={{ padding: '1rem 1rem 0 1rem' }}>
<HistoryLink
to={'/pool' + (!!positionID ? `/${positionID.toString()}` : '')}
to={poolLink}
onClick={() => {
if (adding) {
// not 100% sure both of these are needed
......
......@@ -720,8 +720,6 @@ export default function AddLiquidity({
<RowBetween>
{showApprovalA && (
<ButtonPrimary
borderRadius="12px"
padding={'12px'}
onClick={approveACallback}
disabled={approvalA === ApprovalState.PENDING}
width={showApprovalB ? '48%' : '100%'}
......@@ -737,8 +735,6 @@ export default function AddLiquidity({
)}
{showApprovalB && (
<ButtonPrimary
borderRadius="12px"
padding={'12px'}
onClick={approveBCallback}
disabled={approvalB === ApprovalState.PENDING}
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