From 320b1a34b2e2b07cab505f5a08ca76098006b41f Mon Sep 17 00:00:00 2001 From: bartosz-lipinski <264380+bartosz-lipinski@users.noreply.github.com> Date: Tue, 29 Jun 2021 19:35:48 -0500 Subject: [PATCH] feat: style changes --- .../web/src/components/ArtContent/index.tsx | 2 +- .../src/components/PreSaleBanner/index.tsx | 1 + .../web/src/components/ViewOn/index.tsx | 46 +++++ js/packages/web/src/views/art/index.less | 2 +- js/packages/web/src/views/art/index.tsx | 160 ++++++++++-------- js/packages/web/src/views/auction/index.tsx | 20 +-- 6 files changed, 144 insertions(+), 87 deletions(-) create mode 100644 js/packages/web/src/components/ViewOn/index.tsx diff --git a/js/packages/web/src/components/ArtContent/index.tsx b/js/packages/web/src/components/ArtContent/index.tsx index dc001ad..c3ff69c 100644 --- a/js/packages/web/src/components/ArtContent/index.tsx +++ b/js/packages/web/src/components/ArtContent/index.tsx @@ -212,5 +212,5 @@ export const ArtContent = ({ style={style}/> ); - return
{content}
; + return
{content}
; }; diff --git a/js/packages/web/src/components/PreSaleBanner/index.tsx b/js/packages/web/src/components/PreSaleBanner/index.tsx index f42113b..fb919b5 100644 --- a/js/packages/web/src/components/PreSaleBanner/index.tsx +++ b/js/packages/web/src/components/PreSaleBanner/index.tsx @@ -27,6 +27,7 @@ export const PreSaleBanner = ({ auction }: IPreSaleBanner) => { diff --git a/js/packages/web/src/components/ViewOn/index.tsx b/js/packages/web/src/components/ViewOn/index.tsx new file mode 100644 index 0000000..8d4b918 --- /dev/null +++ b/js/packages/web/src/components/ViewOn/index.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { useParams } from 'react-router-dom'; +import { Row, Col, Button } from 'antd'; +import { + useArt, + useAuction, +} from '../../hooks'; +import { + useConnectionConfig, +} from '@oyster/common'; + +export const ViewOn = () => { + const { id } = useParams<{ id: string }>(); + const { env } = useConnectionConfig(); + const auction = useAuction(id); + const art = useArt(auction?.thumbnail.metadata.pubkey); + + return ( + <> + +
View on
+
+ + +
+ + + ); +}; diff --git a/js/packages/web/src/views/art/index.less b/js/packages/web/src/views/art/index.less index 276a0a1..b07bdbd 100644 --- a/js/packages/web/src/views/art/index.less +++ b/js/packages/web/src/views/art/index.less @@ -31,5 +31,5 @@ .royalties { font-weight: 600; - font-size: 2rem; + font-size: 1.3rem; } diff --git a/js/packages/web/src/views/art/index.tsx b/js/packages/web/src/views/art/index.tsx index cea7721..8fda3f4 100644 --- a/js/packages/web/src/views/art/index.tsx +++ b/js/packages/web/src/views/art/index.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Row, Col, Divider, Layout, Tag, Button } from 'antd'; +import { Row, Col, Divider, Layout, Tag, Button, Skeleton } from 'antd'; import { useParams } from 'react-router-dom'; import { useArt, useExtendedArt } from './../../hooks'; @@ -9,6 +9,7 @@ import { shortenAddress, TokenAccount, useConnection, useUserAccounts, useWallet import { MetaAvatar } from '../../components/MetaAvatar'; import { sendSignMetadata } from '../../actions/sendSignMetadata'; import { PublicKey } from '@solana/web3.js'; +import { ViewOn } from './../../components/ViewOn'; const { Content } = Layout; @@ -72,85 +73,96 @@ export const ArtView = () => { md={{ span: 12 }} style={{ textAlign: 'left', fontSize: '1.4rem' }} > -
{art.title}
-
-
CREATED BY
-
- {(art.creators || []) - .map(creator => { - return ( -
- -
- - {creator.name || shortenAddress(creator.address || '')} - - {/* */} -
- {!creator.verified && - (creator.address === pubkey ? ( - - ) : ( - tag - ))} + +
+ + {creator.name || shortenAddress(creator.address || '')} + +
+ {!creator.verified && + (creator.address === pubkey ? ( + + ) : ( + tag + ))} +
+
-
-
- ); - })} -
+ ); + })} + + + + + {/* */} -
{art.creators?.find(c => !c.verified) && unverified} -
CREATOR ROYALTIES
-
- {((art.seller_fee_basis_points || 0) / 100).toFixed(2)}% -

ABOUT THE CREATION
{description}
diff --git a/js/packages/web/src/views/auction/index.tsx b/js/packages/web/src/views/auction/index.tsx index 8c52829..e9f0c37 100644 --- a/js/packages/web/src/views/auction/index.tsx +++ b/js/packages/web/src/views/auction/index.tsx @@ -58,15 +58,13 @@ export const AuctionItem = ({ height: 300, }; return ( -
- -
+ ); }; @@ -124,9 +122,9 @@ export const AuctionView = () => { {items} -
NUMBER OF WINNERS
+
Number Of Winners

{winnerCount === undefined ? : winnerCount}

-
NUMBER OF NFTs
+
Number Of NFTs

{nftCount === undefined ? : nftCount}

About this {nftCount === 1 ? 'NFT' : 'Collection'}