Skip to content

Commit

Permalink
reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
brucedonovan committed Jul 24, 2023
1 parent 00a145a commit abb9ad0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/components/cactiComponents/ImageResponse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export const ImageResponse = ({
))}
</div>
)}
{description && <div className="py-2" > {description} </div>}
{children && <div className="py-2" > {children} </div>}
{description && <div className="py-2"> {description} </div>}
{children && <div className="py-2"> {children} </div>}
</div>
)}

Expand Down
12 changes: 7 additions & 5 deletions src/components/experimental_/MessageTranslator_.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const MessageTranslator = ({ message }: { message: Message }) => {

useEffect(() => {
if (parsedMessage && parsedMessage.length) {
const list = parsedMessage.reduce((list, item, idx) => {
const list = parsedMessage.reduce((list, item, idx) => {
/* if item is a string (and not nothing) simply send a text response */
if (typeof item === 'string' && item.trim() !== '')
return [
Expand Down Expand Up @@ -159,12 +159,14 @@ export const Widget = (props: WidgetProps) => {

widgets.set('nft-asset-list-container', <NftAssetList {...parsedArgs} />);

widgets.set('nft-asset-traits-container',
<NftAsset {...parsedArgs?.asset?.params}>
{/* <>{ parsedArgs?.asset?.values?.params?.map((trait: any) =>
widgets.set(
'nft-asset-traits-container',
<NftAsset {...parsedArgs?.asset?.params}>
{/* <>{ parsedArgs?.asset?.values?.params?.map((trait: any) =>
console.log( trait) ) }
</> */}
</NftAsset>);
</NftAsset>
);

widgets.set('buy-nft', <BuyNft nftAddress={parsedArgs[0]} tokenId={parsedArgs[1]} />);

Expand Down
10 changes: 5 additions & 5 deletions src/components/experimental_/widgets/nft/NftAsset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useAsset } from '@center-inc/react';
import axios from 'axios';
import { ImageResponse } from '@/components/cactiComponents';
import { ImageVariant } from '@/components/cactiComponents/ImageResponse';
import { ETHEREUM_NETWORK } from '@/utils/constants';
import { InlineChip } from '@/components/cactiComponents/InlineChip';
import { ETHEREUM_NETWORK } from '@/utils/constants';

export interface NftAssetProps {
network: string;
Expand Down Expand Up @@ -49,7 +49,7 @@ export const NftAsset = ({
name,
previewImageUrl,
variant,
price
price,
}: NftAssetProps) => {
// const listPrice = price === 'unlisted' ? 'Not for sale' : price ? price : '';
const {
Expand Down Expand Up @@ -85,11 +85,11 @@ export const NftAsset = ({
<div className="text-xs">{nftData?.metadata?.description}</div>
)}
{price && (
<InlineChip
className="text-xs"
<InlineChip
className="text-xs"
label={price !== 'unlisted' ? `Price: ${price}` : 'Not for Sale'}
image="https://assets.coingecko.com/coins/images/279/thumb/ethereum.png?1608803028"
/>
/>
)}
</ImageResponse>
);
Expand Down

0 comments on commit abb9ad0

Please sign in to comment.