Commit 5e7f6333 authored by aballerr's avatar aballerr Committed by GitHub

fix: Activity updates (#5165)

* listing and styling updates
parent 2aa4ec6a
...@@ -9,24 +9,12 @@ import { ...@@ -9,24 +9,12 @@ import {
AttachPriceIcon, AttachPriceIcon,
BackArrowIcon, BackArrowIcon,
EditPriceIcon, EditPriceIcon,
FloorPriceIcon,
PrevListingIcon,
RowsCollpsedIcon, RowsCollpsedIcon,
RowsExpandedIcon, RowsExpandedIcon,
SamePriceIcon,
VerifiedIcon, VerifiedIcon,
} from 'nft/components/icons' } from 'nft/components/icons'
import { NumericInput } from 'nft/components/layout/Input' import { NumericInput } from 'nft/components/layout/Input'
import { import { badge, body, bodySmall, buttonTextMedium, caption, headlineSmall, subheadSmall } from 'nft/css/common.css'
badge,
body,
bodySmall,
buttonTextMedium,
caption,
headlineSmall,
subhead,
subheadSmall,
} from 'nft/css/common.css'
import { themeVars } from 'nft/css/sprinkles.css' import { themeVars } from 'nft/css/sprinkles.css'
import { useBag, useNFTList, useProfilePageState, useSellAsset } from 'nft/hooks' import { useBag, useNFTList, useProfilePageState, useSellAsset } from 'nft/hooks'
import { import {
...@@ -42,9 +30,20 @@ import { fetchPrice } from 'nft/utils/fetchPrice' ...@@ -42,9 +30,20 @@ import { fetchPrice } from 'nft/utils/fetchPrice'
import { ListingMarkets } from 'nft/utils/listNfts' import { ListingMarkets } from 'nft/utils/listNfts'
import { pluralize } from 'nft/utils/roundAndPluralize' import { pluralize } from 'nft/utils/roundAndPluralize'
import { Dispatch, FormEvent, useEffect, useMemo, useRef, useState } from 'react' import { Dispatch, FormEvent, useEffect, useMemo, useRef, useState } from 'react'
import styled from 'styled-components/macro'
import * as styles from './ListPage.css' import * as styles from './ListPage.css'
const MarkplaceWrap = styled.div`
align-self: flex-start;
padding-right: 40px;
max-width: 1200px;
@media screen and (min-width: ${({ theme }) => theme.breakpoint.sm}px) {
padding-bottom: 20px;
}
`
const SelectMarketplacesModal = ({ const SelectMarketplacesModal = ({
setSelectedMarkets, setSelectedMarkets,
selectedMarkets, selectedMarkets,
...@@ -53,7 +52,7 @@ const SelectMarketplacesModal = ({ ...@@ -53,7 +52,7 @@ const SelectMarketplacesModal = ({
selectedMarkets: ListingMarket[] selectedMarkets: ListingMarket[]
}) => { }) => {
return ( return (
<Column alignSelf="flex-start" paddingRight="40" paddingBottom={{ sm: '20', lg: '0' }}> <MarkplaceWrap>
<Row className={headlineSmall}>Select marketplaces</Row> <Row className={headlineSmall}>Select marketplaces</Row>
<Row className={caption} color="textSecondary" marginTop="4"> <Row className={caption} color="textSecondary" marginTop="4">
Increase the visibility of your listings by selecting multiple marketplaces. Increase the visibility of your listings by selecting multiple marketplaces.
...@@ -63,7 +62,7 @@ const SelectMarketplacesModal = ({ ...@@ -63,7 +62,7 @@ const SelectMarketplacesModal = ({
return GlobalMarketplaceButton({ market, setSelectedMarkets, selectedMarkets }) return GlobalMarketplaceButton({ market, setSelectedMarkets, selectedMarkets })
})} })}
</Row> </Row>
</Column> </MarkplaceWrap>
) )
} }
...@@ -315,17 +314,14 @@ const NFTListingsGrid = ({ selectedMarkets }: { selectedMarkets: ListingMarket[] ...@@ -315,17 +314,14 @@ const NFTListingsGrid = ({ selectedMarkets }: { selectedMarkets: ListingMarket[]
{ {
displayText: 'Same price', displayText: 'Same price',
onClick: () => setGlobalPriceMethod(SetPriceMethod.SAME_PRICE), onClick: () => setGlobalPriceMethod(SetPriceMethod.SAME_PRICE),
icon: <SamePriceIcon />,
}, },
{ {
displayText: 'Floor price', displayText: 'Floor price',
onClick: () => setGlobalPriceMethod(SetPriceMethod.FLOOR_PRICE), onClick: () => setGlobalPriceMethod(SetPriceMethod.FLOOR_PRICE),
icon: <FloorPriceIcon />,
}, },
{ {
displayText: 'Prev. listing', displayText: 'Prev. listing',
onClick: () => setGlobalPriceMethod(SetPriceMethod.PREV_LISTING), onClick: () => setGlobalPriceMethod(SetPriceMethod.PREV_LISTING),
icon: <PrevListingIcon />,
}, },
], ],
[] []
...@@ -440,7 +436,7 @@ const PriceTextInput = ({ ...@@ -440,7 +436,7 @@ const PriceTextInput = ({
return ( return (
<Column gap="12" position="relative"> <Column gap="12" position="relative">
<Row <Row
color="backgroundOutline" color="textTertiary"
height="44" height="44"
width="min" width="min"
padding="4" padding="4"
...@@ -463,7 +459,7 @@ const PriceTextInput = ({ ...@@ -463,7 +459,7 @@ const PriceTextInput = ({
borderStyle="none" borderStyle="none"
className={body} className={body}
color={{ placeholder: 'textSecondary', default: 'textPrimary' }} color={{ placeholder: 'textSecondary', default: 'textPrimary' }}
placeholder="Set" placeholder="0"
marginRight="0" marginRight="0"
marginLeft="14" marginLeft="14"
backgroundColor="none" backgroundColor="none"
...@@ -544,16 +540,16 @@ const EthPriceDisplay = ({ ethPrice = 0 }: { ethPrice?: number }) => { ...@@ -544,16 +540,16 @@ const EthPriceDisplay = ({ ethPrice = 0 }: { ethPrice?: number }) => {
setEthConversion(price ?? 0) setEthConversion(price ?? 0)
}) })
}, []) }, [])
return ( return (
<Column width="full"> <Column width="full">
<Row width="full" justifyContent="flex-end"> <Row width="full" justifyContent="flex-end">
<Box className={subhead} color={ethPrice !== 0 ? 'textPrimary' : 'textSecondary'} marginLeft="auto"> {ethPrice !== 0 ? (
{formatEth(ethPrice)} ETH
</Box>
{ethPrice !== 0 && (
<Box className={body} color="textSecondary" marginLeft="12" marginRight="0"> <Box className={body} color="textSecondary" marginLeft="12" marginRight="0">
{formatUsdPrice(ethPrice * ethConversion)} {formatUsdPrice(ethPrice * ethConversion)}
</Box> </Box>
) : (
'- Eth'
)} )}
</Row> </Row>
</Column> </Column>
...@@ -840,6 +836,15 @@ const NFTListRow = ({ asset, globalPriceMethod, globalPrice, setGlobalPrice, sel ...@@ -840,6 +836,15 @@ const NFTListRow = ({ asset, globalPriceMethod, globalPrice, setGlobalPrice, sel
) )
} }
const MarketWrap = styled.section`
gap: 48px;
padding-left: 18px;
padding-right: 48x;
margin-left: auto;
margin-right: auto;
max-width: 1200px;
`
export const ListPage = () => { export const ListPage = () => {
const { setProfilePageState: setSellPageState } = useProfilePageState() const { setProfilePageState: setSellPageState } = useProfilePageState()
const setGlobalMarketplaces = useSellAsset((state) => state.setGlobalMarketplaces) const setGlobalMarketplaces = useSellAsset((state) => state.setGlobalMarketplaces)
...@@ -885,13 +890,13 @@ export const ListPage = () => { ...@@ -885,13 +890,13 @@ export const ListPage = () => {
<BackArrowIcon fill={themeVars.colors.textSecondary} /> <BackArrowIcon fill={themeVars.colors.textSecondary} />
</Box> </Box>
</Column> </Column>
<Column as="section" gap="48" paddingLeft="18" paddingRight="48" width="full"> <MarketWrap>
<Row flexWrap={{ sm: 'wrap', lg: 'nowrap' }}> <Row flexWrap={{ sm: 'wrap', lg: 'nowrap' }}>
<SelectMarketplacesModal setSelectedMarkets={setSelectedMarkets} selectedMarkets={selectedMarkets} /> <SelectMarketplacesModal setSelectedMarkets={setSelectedMarkets} selectedMarkets={selectedMarkets} />
<SetDurationModal /> <SetDurationModal />
</Row> </Row>
<NFTListingsGrid selectedMarkets={selectedMarkets} /> <NFTListingsGrid selectedMarkets={selectedMarkets} />
</Column> </MarketWrap>
<Box display={{ sm: 'flex', md: 'none' }} marginTop="14" marginX="16" marginBottom="32"> <Box display={{ sm: 'flex', md: 'none' }} marginTop="14" marginX="16" marginBottom="32">
<ListingButton onClick={toggleBag} buttonText={'Continue listing'} /> <ListingButton onClick={toggleBag} buttonText={'Continue listing'} />
</Box> </Box>
......
...@@ -16,6 +16,7 @@ import * as styles from './ProfilePage.css' ...@@ -16,6 +16,7 @@ import * as styles from './ProfilePage.css'
const ItemsContainer = styled.div` const ItemsContainer = styled.div`
${ScrollBarStyles} ${ScrollBarStyles}
overflow-y: auto;
` `
export const FilterSidebar = () => { export const FilterSidebar = () => {
......
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