UNPKG

@mojito-inc/secondary-market

Version:

Mojito secondary market is the platform to purchase NFT.

2 lines (1 loc) 2.78 kB
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useMemo as i,useCallback as n}from"react";import o from"@mui/material/Typography";import r from"@mui/material/Box";import a from"@mui/material/Stack";import{useTheme as l}from"@mui/material/styles";import d from"@mui/icons-material/HelpOutline";import{getChainExplorerURL as s}from"../utils/getEtherScanURL.utils.js";import{truncateAddress as c}from"../utils/truncateAddress.utils.js";const m=({networkName:m,tokenType:p,contractAddress:x,tokenId:f,chainId:u,metaDataURL:h,edition:g,walletType:w})=>{var y,v,S,k,z,b;const C=l(),W=i((()=>"solana"===w),[w]),j=n((()=>{const e=s(u,x,f);window.open(e,"_blank")}),[u,x,f]),I=n((()=>{window.open(h,"_blank")}),[h]);return e(r,{children:[e(a,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",marginBottom:"10px"},children:[t(o,{sx:{fontSize:"12px",fontWeight:"500"},children:"Network:"}),t(o,{sx:{fontSize:"12px",padding:"10px",borderRadius:"100px",backgroundColor:"#424242",height:"10px",display:"flex",alignItems:"center",justifyContent:"center",color:C.palette.text.secondary,textTransform:"uppercase",fontWeight:700},children:W?"Solana":m})]}),e(a,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",marginBottom:"14px"},children:[t(o,{sx:{fontSize:"12px",fontWeight:"500"},children:"On-chain Collection:"}),t(o,{"data-testid":"contract_address",onClick:j,sx:{fontSize:"12px",fontWeight:"400",textDecorationLine:"underline",color:null===(v=null===(y=null==C?void 0:C.palette)||void 0===y?void 0:y.primary)||void 0===v?void 0:v.main,cursor:"pointer"},children:c(x)})]}),e(a,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",marginBottom:"14px"},children:[t(o,{sx:{fontSize:"12px",fontWeight:"500"},children:"Token Address:"}),t(o,{"data-testid":"meta_data_url",onClick:I,sx:{fontSize:"12px",fontWeight:"400",textDecorationLine:"underline",color:null===(k=null===(S=null==C?void 0:C.palette)||void 0===S?void 0:S.primary)||void 0===k?void 0:k.main,cursor:"pointer"},children:c(f)})]}),e(a,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between"},children:[t(o,{sx:{fontSize:"12px",fontWeight:"500"},children:"Token Standard:"}),t(o,{"data-testid":"meta_data_url",sx:{fontSize:"12px",fontWeight:"400"},children:W?"Programmable NFT":p})]}),g&&!W&&e(a,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",marginTop:"14px"},children:[e(a,{direction:"row",sx:{alignItems:"center"},children:[t(o,{sx:{fontSize:"12px",fontWeight:"500"},children:"Editions:"}),t(d,{sx:{marginLeft:"4px",fontSize:"14px",color:null===(b=null===(z=C.palette)||void 0===z?void 0:z.grey)||void 0===b?void 0:b[400]}})]}),t(o,{sx:{fontSize:"12px",fontWeight:"400"},children:g})]})]})};export{m as default};