Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: display price currency #196

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ export default function MobileCollectionActivity({
{activity.token_metadata?.name ?? activity.name}
</Link>
{activity.price ? (
<PriceTag price={activity.price} className="h-7 text-xs" />
<PriceTag
price={activity.price}
currency={activity.currency}
className="h-7 text-xs"
/>
) : null}
</div>

Expand Down
4 changes: 2 additions & 2 deletions apps/arkmarket/src/app/components/latest-sales.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function LatestSales() {
WebkitTextStrokeColor: "black",
}}
>
Latest sale
Latest sales
</p>
<p
className="hidden whitespace-nowrap text-transparent dark:block"
Expand All @@ -53,7 +53,7 @@ export default function LatestSales() {
WebkitTextStrokeColor: "white",
}}
>
Latest sale
Latest sales
</p>
</Marquee>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ export default function DesktopTokenActivity({
>
<EventCell activity={activity} />
<TableCell>
{activity.price ? <PriceTag price={activity.price} /> : "_"}
{activity.price ? (
<PriceTag
price={activity.price}
currency={activity.currency}
/>
) : (
"_"
)}
</TableCell>

<ActivityToFromCell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ export default function MobileTokenActivity({
<p>{activityTypeMetadata[activity.activity_type].title}</p>
</div>
{activity.price ? (
<PriceTag price={activity.price} className="h-7 text-xs" />
<PriceTag
price={activity.price}
currency={activity.currency}
className="h-7 text-xs"
/>
) : (
"_"
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ export default function MobilePortfolioActivity({
</Link>

{activity.price ? (
<PriceTag price={activity.price} className="h-7 text-xs" />
<PriceTag
price={activity.price}
currency={activity.currency}
className="h-7 text-xs"
/>
) : null}
</div>

Expand Down
6 changes: 5 additions & 1 deletion apps/arkmarket/src/components/cells/activity-price-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export default function PriceCell({ activity }: PriceCellProps) {
return (
<TableCell className="flex">
{activity.price ? (
<PriceTag price={activity.price} className="max-w-full" />
<PriceTag
price={activity.price}
currency={activity.currency}
className="max-w-full"
/>
) : (
"_"
)}
Expand Down
20 changes: 20 additions & 0 deletions apps/arkmarket/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ export interface PortfolioActivity {
to: string;
token_id: string;
transaction_hash: string | null;
currency?: {
contract: string;
decimals: number;
symbol: string;
} | null;
}

export interface PortfolioOffers {
Expand All @@ -202,6 +207,11 @@ export interface PortfolioOffers {
start_amount: string | null;
start_date: number | null;
};
currency?: {
contract: string;
decimals: number;
symbol: string;
} | null;
}

export interface CollectionActivity {
Expand All @@ -216,6 +226,11 @@ export interface CollectionActivity {
token_id: string;
token_metadata: TokenMetadata | null;
transaction_hash: string | null;
currency?: {
contract: string;
decimals: number;
symbol: string;
} | null;
}

export interface TokenOffer {
Expand Down Expand Up @@ -294,6 +309,11 @@ export interface TokenActivity {
time_stamp: number;
to: string | null;
transaction_hash: string | null;
currency?: {
contract: string;
decimals: number;
symbol: string;
} | null;
}

export interface Filters {
Expand Down
Loading