diff --git a/src/nft/components/collection/CollectionNfts.tsx b/src/nft/components/collection/CollectionNfts.tsx index 1ec67a0d44..892690bb18 100644 --- a/src/nft/components/collection/CollectionNfts.tsx +++ b/src/nft/components/collection/CollectionNfts.tsx @@ -96,7 +96,7 @@ const ActionsSubContainer = styled.div` } ` -export const SortDropdownContainer = styled.div<{ isFiltersExpanded: boolean }>` +const SortDropdownContainer = styled.div<{ isFiltersExpanded: boolean }>` width: max-content; height: 44px; @media only screen and (max-width: ${({ theme }) => `${theme.breakpoint.lg}px`}) { @@ -127,7 +127,7 @@ export const ClearAllButton = styled.button` background: none; ` -export const InfiniteScrollWrapper = styled.div` +const InfiniteScrollWrapper = styled.div` ${InfiniteScrollWrapperCss} ` @@ -176,7 +176,7 @@ export const LoadingAssets = ({ count }: { count?: number }) => ( ) -export const CollectionNftsLoading = () => ( +const CollectionNftsLoading = () => ( diff --git a/src/nft/components/collection/Sweep.tsx b/src/nft/components/collection/Sweep.tsx index c74a5e5f68..128b64a59a 100644 --- a/src/nft/components/collection/Sweep.tsx +++ b/src/nft/components/collection/Sweep.tsx @@ -136,7 +136,7 @@ interface NftDisplayProps { nfts: GenieAsset[] } -export const NftDisplay = ({ nfts }: NftDisplayProps) => { +const NftDisplay = ({ nfts }: NftDisplayProps) => { return ( {[...Array(3)].map((_, index) => { diff --git a/src/nft/components/collection/TraitSelect.css.ts b/src/nft/components/collection/TraitSelect.css.ts deleted file mode 100644 index 0a08c5d265..0000000000 --- a/src/nft/components/collection/TraitSelect.css.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { style } from '@vanilla-extract/css' - -export const list = style({ - overflowAnchor: 'none', - scrollbarWidth: 'none', - msOverflowStyle: 'none', - selectors: { - '&::-webkit-scrollbar': { - display: 'none', - }, - }, -}) diff --git a/src/nft/components/details/Details.tsx b/src/nft/components/details/Details.tsx deleted file mode 100644 index 643a6917ee..0000000000 --- a/src/nft/components/details/Details.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { bodySmall } from '../../css/common.css' -import { shortenAddress } from '../../utils/address' -import { Box, BoxProps } from '../Box' -import { Column, Row } from '../Flex' - -const DetailItemLabel = (props: BoxProps) => - -const DetailItemValue = (props: BoxProps) => ( - -) - -const Detail = (props: BoxProps) => ( - -) - -export const Details = ({ - contractAddress, - tokenId, - metadataUrl, - tokenType, - totalSupply, - blockchain, -}: { - contractAddress: string - tokenId: string - metadataUrl?: string - tokenType: string - totalSupply?: number - blockchain: string -}) => ( - - - - Contract Address: - - {shortenAddress(contractAddress)} - - - - Token ID: - {tokenId} - - {metadataUrl ? ( - - Metadata: - - {metadataUrl.slice(0, 12)}... - - - ) : null} - - - - - Contract type: - {tokenType} - - - Total supply: - {totalSupply} - - - Blockchain: - {blockchain} - - - -) diff --git a/src/nft/components/explore/ActivityFeed.tsx b/src/nft/components/explore/ActivityFeed.tsx deleted file mode 100644 index 6ad8cf711d..0000000000 --- a/src/nft/components/explore/ActivityFeed.tsx +++ /dev/null @@ -1,128 +0,0 @@ -import clsx from 'clsx' -import { Box } from 'nft/components/Box' -import { Column, Row } from 'nft/components/Flex' -import { ActivityFetcher } from 'nft/queries' -import { ActivityEvent, ActivityEventTypeDisplay, Markets } from 'nft/types' -import { formatEthPrice } from 'nft/utils/currency' -import { getTimeDifference, isValidDate } from 'nft/utils/date' -import { putCommas } from 'nft/utils/putCommas' -import { useEffect, useMemo, useReducer, useState } from 'react' -import { useQuery } from 'react-query' -import { useNavigate } from 'react-router-dom' - -import * as styles from './Explore.css' - -const ActivityFeed = ({ address }: { address: string }) => { - const [current, setCurrent] = useState(0) - const [hovered, toggleHover] = useReducer((state) => !state, false) - const navigate = useNavigate() - const { data: collectionActivity } = useQuery(['collectionActivity', address], () => ActivityFetcher(address), { - staleTime: 5000, - }) - - useEffect(() => { - const interval = setInterval(() => { - if (collectionActivity && !hovered) setCurrent(current === collectionActivity.events.length - 1 ? 0 : current + 1) - }, 3000) - return () => clearInterval(interval) - }, [current, collectionActivity, hovered]) - - return ( - - {collectionActivity ? ( - - - { - e.preventDefault() - e.stopPropagation() - navigate(`/nfts/asset/${address}/${collectionActivity.events[current].tokenId}?origin=explore`) - }} - /> - - - {collectionActivity.events.map((activityEvent: ActivityEvent, index: number) => { - return - })} - - - ) : null} - - ) -} - -const ActivityRow = ({ event, index, current }: { event: ActivityEvent; index: number; current: number }) => { - const navigate = useNavigate() - - const formattedPrice = useMemo( - () => (event.price ? putCommas(formatEthPrice(event.price))?.toString() : null), - [event.price] - ) - - const scrollPosition = useMemo(() => { - const itemHeight = 56 - if (current === index) return current === 0 ? 0 : itemHeight / 2 - if (index > current) - return current === 0 ? (index - current) * itemHeight : (index - current) * itemHeight + itemHeight / 2 - if (index < current) - return current === 0 ? -(current - index) * itemHeight : -((current - index) * itemHeight - itemHeight / 2) - else return 0 - }, [index, current]) - - return ( - { - e.preventDefault() - e.stopPropagation() - navigate(`/nfts/asset/${event.collectionAddress}/${event.tokenId}?origin=explore`) - }} - > - - - {ActivityEventTypeDisplay[event.eventType]} - - for - - {formattedPrice} ETH - - - {event.eventTimestamp && isValidDate(event.eventTimestamp) && ( - - {getTimeDifference(event.eventTimestamp?.toString())} - {event.marketplace && } - - )} - - ) -} - -export default ActivityFeed - -const MarketplaceIcon = ({ marketplace }: { marketplace: Markets }) => { - return ( - - ) -} diff --git a/src/nft/components/explore/CarouselCard.tsx b/src/nft/components/explore/CarouselCard.tsx index 3c7870c1f8..646bae1d2e 100644 --- a/src/nft/components/explore/CarouselCard.tsx +++ b/src/nft/components/explore/CarouselCard.tsx @@ -196,7 +196,7 @@ interface MarketplaceRowProps { listings?: number } -export const MarketplaceRow = ({ marketplace, floorInEth, listings }: MarketplaceRowProps) => { +const MarketplaceRow = ({ marketplace, floorInEth, listings }: MarketplaceRowProps) => { return ( <> @@ -284,7 +284,7 @@ export const CarouselCard = ({ collection, onClick }: CarouselCardProps) => { const DEFAULT_TABLE_ELEMENTS = 12 -export const LoadingTable = () => { +const LoadingTable = () => { return ( <> {[...Array(DEFAULT_TABLE_ELEMENTS)].map((index) => ( diff --git a/src/nft/components/icons.tsx b/src/nft/components/icons.tsx index 73733bb1d9..41d125e339 100644 --- a/src/nft/components/icons.tsx +++ b/src/nft/components/icons.tsx @@ -50,15 +50,6 @@ export const BackArrowIcon = (props: SVGProps) => ( ) -export const WarningIcon = (props: SVGProps) => ( - - - -) - export const VerifiedIcon = (props: SVGProps) => { const theme = useTheme() return ( @@ -84,16 +75,6 @@ export const PoolIcon = (props: SVGProps) => ( ) -export const SuspiciousIcon = (props: SVGProps) => ( - - - - -) - export const XMarkIcon = (props: SVGProps) => ( ( ) -export const MinusIcon = (props: SVGProps) => ( - - - -) - -export const PlusIcon = (props: SVGProps) => ( - - - -) - export const ExternalIcon = (props: SVGProps) => ( ( ) -export const CopyIcon = (props: SVGProps) => ( - - - - -) - export const CrossIcon = (props: SVGProps) => ( ( ) -export const ShareIcon = () => ( - - - - -) export const RowsExpandedIcon = () => ( ( ) -export const CloseIcon = (props: SVGProps) => ( - - - -) - export const GovernanceIcon = (props: SVGProps) => (