-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
token view, responsive fixes, refine account sidebar
- Loading branch information
1 parent
90c1fd1
commit 563386a
Showing
20 changed files
with
438 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 29 additions & 14 deletions
43
apps/nextjs/src/app/(app)/collection/ViewOnMarketplace.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,33 @@ | ||
import Link from "next/link"; | ||
import { Button } from "@realms-world/ui/components/ui/button"; | ||
import Link from "next/link" | ||
import { ShoppingCart } from "lucide-react"; | ||
|
||
export const ViewOnMarketplace = ({ collection, tokenId }: { collection: string, tokenId?: number }) => { | ||
// Define the base URL | ||
const baseURL = 'https://market.realms.world/'; | ||
export const ViewOnMarketplace = ({ | ||
collection, | ||
tokenId, | ||
icon, | ||
}: { | ||
collection: string; | ||
tokenId?: number | string; | ||
icon?: boolean; | ||
}) => { | ||
// Define the base URL | ||
const baseURL = "https://market.realms.world/"; | ||
|
||
// Construct the URL based on whether `tokenId` is provided | ||
const url = tokenId | ||
? `${baseURL}token/${collection}/${tokenId}` | ||
: `${baseURL}collection/${collection}`; | ||
// Construct the URL based on whether `tokenId` is provided | ||
const url = tokenId | ||
? `${baseURL}token/${collection}/${tokenId}` | ||
: `${baseURL}collection/${collection}`; | ||
|
||
return ( | ||
<Link href={url}> | ||
<Button className="w-full">View on Marketplace</Button> | ||
</Link> | ||
) | ||
} | ||
return ( | ||
<Link href={url}> | ||
{icon ? ( | ||
<Button> | ||
<ShoppingCart /> | ||
</Button> | ||
) : ( | ||
<Button className="w-full">View on Marketplace</Button> | ||
)} | ||
</Link> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.