FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: broken Checkmark image for Mobile NFT Sort dropdown (#7401) · lineCode/interface@04bf075 · GitHub

Repository navigation

Commit 04bf075

Browse files
authored
fix: broken Checkmark image for Mobile NFT Sort dropdown (Uniswap#7401)
fix broken image
1 parent 27ec2e0 commit 04bf075

1 file changed

Lines changed: 9 additions & 14 deletions

File tree

‎src/nft/components/common/SortDropdown/FilterSortDropdown.tsx‎

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
import { Box } from 'nft/components/Box'
21
import { FilterDropdown, FilterItem } from 'nft/components/collection/MarketplaceSelect'
32
import { useCollectionFilters } from 'nft/hooks'
43
import { DropDownOption } from 'nft/types'
54
import { useState } from 'react'
5+
import { Check } from 'react-feather'
6+
import styled from 'styled-components'
7+
8+
const CheckIcon = styled(Check)`
9+
height: 20px;
10+
width: 20px;
11+
color: ${({ theme }) => theme.accent1};
12+
`
613

714
export const FilterSortDropdown = ({ sortDropDownOptions }: { sortDropDownOptions: DropDownOption[] }) => {
815
const [isOpen, setOpen] = useState(false)
@@ -24,19 +31,7 @@ const SortByItem = ({
2431
parentOnClick: React.MouseEventHandler<HTMLElement>
2532
}) => {
2633
const sortBy = useCollectionFilters((state) => state.sortBy)
27-
const checkMark =
28-
dropDownOption.sortBy !== undefined && sortBy === dropDownOption.sortBy ? (
29-
<Box
30-
as="img"
31-
alt={dropDownOption.displayText}
32-
width="20"
33-
height="20"
34-
objectFit="cover"
35-
src="/nft/svgs/checkmark.svg"
36-
/>
37-
) : (
38-
<></>
39-
)
34+
const checkMark = dropDownOption.sortBy !== undefined && sortBy === dropDownOption.sortBy ? <CheckIcon /> : <></>
4035
const onClick: React.MouseEventHandler<HTMLElement> = (e) => {
4136
e.preventDefault()
4237
parentOnClick(e)

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL