Skip to content

Commit

Permalink
fix(list popup): big token list updates scroll issue (Uniswap#1219)
Browse files Browse the repository at this point in the history
  • Loading branch information
eccentricexit authored Nov 20, 2020
1 parent 7fd4005 commit 5b2c445
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/Popups/ListUpdatePopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { useCallback, useMemo } from 'react'
import ReactGA from 'react-ga'
import { useDispatch } from 'react-redux'
import { Text } from 'rebass'
import styled from 'styled-components'
import { AppDispatch } from '../../state'
import { useRemovePopup } from '../../state/application/hooks'
import { acceptListUpdate } from '../../state/lists/actions'
Expand All @@ -12,6 +13,11 @@ import { ButtonSecondary } from '../Button'
import { AutoColumn } from '../Column'
import { AutoRow } from '../Row'

export const ChangesList = styled.ul`
max-height: 400px;
overflow: auto;
`

export default function ListUpdatePopup({
popKey,
listUrl,
Expand Down Expand Up @@ -64,7 +70,7 @@ export default function ListUpdatePopup({
An update is available for the token list "{oldList.name}" (
{listVersionLabel(oldList.version)} to {listVersionLabel(newList.version)}).
</Text>
<ul>
<ChangesList>
{tokensAdded.length > 0 ? (
<li>
{tokensAdded.map((token, i) => (
Expand All @@ -88,7 +94,7 @@ export default function ListUpdatePopup({
</li>
) : null}
{numTokensChanged > 0 ? <li>{numTokensChanged} tokens updated</li> : null}
</ul>
</ChangesList>
</div>
<AutoRow>
<div style={{ flexGrow: 1, marginRight: 12 }}>
Expand Down

0 comments on commit 5b2c445

Please sign in to comment.