| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 27ec2e0 commit 04bf075
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,15 @@ | |||
| 1 | - import { Box } from 'nft/components/Box' | ||
| 2 | 1 | import { FilterDropdown, FilterItem } from 'nft/components/collection/MarketplaceSelect' | |
| 3 | 2 | import { useCollectionFilters } from 'nft/hooks' | |
| 4 | 3 | import { DropDownOption } from 'nft/types' | |
| 5 | 4 | 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 | + ` | ||
| 6 | 13 | ||
| 7 | 14 | export const FilterSortDropdown = ({ sortDropDownOptions }: { sortDropDownOptions: DropDownOption[] }) => { | |
| 8 | 15 | const [isOpen, setOpen] = useState(false) | |
@@ -24,19 +31,7 @@ const SortByItem = ({ | |||
| 24 | 31 | parentOnClick: React.MouseEventHandler<HTMLElement> | |
| 25 | 32 | }) => { | |
| 26 | 33 | 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 /> : <></> | ||
| 40 | 35 | const onClick: React.MouseEventHandler<HTMLElement> = (e) => { | |
| 41 | 36 | e.preventDefault() | |
| 42 | 37 | parentOnClick(e) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments