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(market): display collection creation date #204

Merged
merged 1 commit into from
Nov 19, 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
@@ -1,6 +1,7 @@
"use client";

import { useState } from "react";
import moment from "moment";

import { cn, focusableStyles } from "@ark-market/ui";
import {
Expand Down Expand Up @@ -104,7 +105,17 @@ export default function CollectionHeader({
</div>
</div>
<CollapsibleContent className="data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down">
<p className="mb-6 max-w-lg pt-4 text-sm">{collection.description}</p>
<p className="mb-2 max-w-lg pt-4 text-sm">{collection.description}</p>
<p className="flex items-center gap-2 text-sm">
Created
<span className="text-muted-foreground">
{collection.deployed_timestamp
? moment.unix(collection.deployed_timestamp).format("MMM YYYY")
: "-"}
</span>
Creator earnings
<span className="text-muted-foreground"> 5%</span>
</p>
<div className="block lg:hidden">
<CollectionHeaderStats collection={data} />
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";

import { useState } from "react";
import moment from "moment";

import { cn } from "@ark-market/ui";
import {
Expand Down Expand Up @@ -62,9 +63,15 @@ export default function MobileCollectionHeader({
<div className="flex flex-col gap-3 px-5 pb-4">
<p className="flex items-center gap-2 text-sm">
Created
<span className="text-muted-foreground"> Feb 2000</span>
<span className="text-muted-foreground">
{collection.deployed_timestamp
? moment
.unix(collection.deployed_timestamp)
.format("MMM YYYY")
: "-"}
</span>
Creator earnings
<span className="text-muted-foreground"> 1000%</span>
<span className="text-muted-foreground"> 5%</span>
</p>
<div className="flex items-center gap-4 text-muted-foreground">
<CopyButton textToCopy={collectionAddress} className="h-6" />
Expand Down
1 change: 1 addition & 0 deletions apps/arkmarket/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export interface Collection {
address: string;
description?: string;
deployed_timestamp?: number;
discord?: string;
floor?: string;
floor_7d_percentage: string;
Expand Down
Loading