-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
plondon
committed
Nov 24, 2021
1 parent
f9ddd10
commit 82601be
Showing
11 changed files
with
216 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
packages/blockchain-wallet-v4-frontend/src/scenes/Nfts/Offers/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React, { useEffect } from 'react' | ||
import styled from 'styled-components' | ||
|
||
import { displayCoinToCoin } from '@core/exchange' | ||
import { Button, Text } from 'blockchain-info-components' | ||
import LazyLoadWrapper from 'components/LazyLoadContainer' | ||
|
||
import { Props as OwnProps } from '..' | ||
|
||
const Row = styled(Text)` | ||
width: 100%; | ||
display: flex; | ||
font-size: 14px; | ||
font-weight: 600; | ||
justify-content: space-between; | ||
padding: 12px 0; | ||
border-bottom: 1px solid ${(props) => props.theme.grey000}; | ||
` | ||
|
||
const Col = styled.div` | ||
display: flex; | ||
align-items: center; | ||
> div { | ||
margin-right: 8px; | ||
} | ||
` | ||
|
||
const Offers: React.FC<Props> = (props) => { | ||
useEffect(() => { | ||
props.nftsActions.fetchNftOffersMade() | ||
}, []) | ||
|
||
return ( | ||
<LazyLoadWrapper onLazyLoad={() => props.nftsActions.fetchNftOffersMade()}> | ||
{props.offersMade.list.map((offer, i) => { | ||
return ( | ||
<Row key={i}> | ||
<Col> | ||
<img | ||
style={{ height: '32px', marginRight: '8px' }} | ||
alt='' | ||
src={offer.asset.image_thumbnail_url} | ||
/> | ||
<div>{offer.asset.collection.name}</div> | ||
<div>-</div> | ||
<div>({offer.asset.name})</div> | ||
</Col> | ||
<Col> | ||
<div> | ||
{displayCoinToCoin({ coin: offer.payment_token.symbol, value: offer.bid_amount })} | ||
</div> | ||
<div> | ||
<Button width='72px' height='32px' data-e2e='cancelOffer' nature='empty-blue'> | ||
Cancel | ||
</Button> | ||
</div> | ||
</Col> | ||
</Row> | ||
) | ||
})} | ||
</LazyLoadWrapper> | ||
) | ||
} | ||
|
||
type Props = OwnProps | ||
|
||
export default Offers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.