-
Notifications
You must be signed in to change notification settings - Fork 619
[MNY-92] Dashboard: Add tokens section in explore #7812
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
Merged
graphite-app
merged 1 commit into
main
from
08-07-dashboard_add_tokens_section_in_explore
Aug 7, 2025
+401
−25
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
111 changes: 111 additions & 0 deletions
111
apps/dashboard/src/app/(app)/(dashboard)/explore/tokens-section.tsx
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| "use client"; | ||
|
|
||
| import { ZapIcon } from "lucide-react"; | ||
| import Link from "next/link"; | ||
| import { reportTokenUpsellClicked } from "@/analytics/report"; | ||
| import { GridPattern } from "@/components/ui/background-patterns"; | ||
| import { Badge } from "@/components/ui/badge"; | ||
| import { cn } from "@/lib/utils"; | ||
|
|
||
| export function TokensSection() { | ||
| return ( | ||
| <div className="bg-card p-4 lg:py-8 lg:px-6 border rounded-xl relative w-full overflow-hidden"> | ||
| <GridPattern | ||
| width={30} | ||
| height={30} | ||
| strokeDasharray={"4 2"} | ||
| className="text-border dark:text-border/70 hidden lg:block translate-x-5" | ||
| style={{ | ||
| maskImage: | ||
| "linear-gradient(to bottom left,white,transparent,transparent)", | ||
| }} | ||
| /> | ||
|
|
||
| <Badge | ||
| variant="outline" | ||
| className="text-sm bg-background h-auto px-3 py-1 gap-2 mb-4" | ||
| > | ||
| <div className="rounded-full bg-primary size-2" /> | ||
| New | ||
| </Badge> | ||
|
|
||
| <h2 className="font-semibold text-2xl tracking-tight mb-1"> | ||
| Launch Your Tokens Effortlessly | ||
| </h2> | ||
| <p className="text-muted-foreground mb-6 text-sm lg:text-base"> | ||
| Deploy contract and configure all settings you need to launch your token | ||
| in one seamless flow | ||
| </p> | ||
|
|
||
| <div className="grid grid-cols-1 md:grid-cols-2 gap-4 max-w-4xl"> | ||
| <CardLink | ||
| assetType="coin" | ||
| title="Launch Coin" | ||
| description="Launch an ERC-20 token to create a cryptocurrency" | ||
| href="/team/~/~project/tokens/create/token" | ||
| bullets={[ | ||
| "Deploy Contract", | ||
| "Configure Price and Supply", | ||
| "Airdrop Tokens", | ||
| ]} | ||
| /> | ||
|
|
||
| <CardLink | ||
| assetType="nft" | ||
| title="Launch NFT Collection" | ||
| description="Launch an ERC-721 or ERC-1155 NFT collection" | ||
| href="/team/~/~project/tokens/create/nft" | ||
| bullets={[ | ||
| "Deploy Contract", | ||
| "Upload NFTs", | ||
| "Configure Price and Supply", | ||
| ]} | ||
| /> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| function CardLink(props: { | ||
| title: string; | ||
| description: string; | ||
| href: string; | ||
| assetType: "nft" | "coin"; | ||
| bullets: string[]; | ||
| }) { | ||
| return ( | ||
| <div | ||
| className={cn( | ||
| "relative flex flex-col rounded-lg border p-4 cursor-pointer hover:border-active-border bg-background", | ||
| )} | ||
| > | ||
| <div className="mb-3 flex"> | ||
| <div className="flex items-center justify-center rounded-full border p-2 bg-card"> | ||
| <ZapIcon className="size-4 text-muted-foreground" /> | ||
| </div> | ||
| </div> | ||
|
|
||
| <h3 className="mb-0.5 font-semibold text-lg tracking-tight"> | ||
| <Link | ||
| className="before:absolute before:inset-0" | ||
| href={props.href} | ||
| onClick={() => { | ||
| reportTokenUpsellClicked({ | ||
| assetType: props.assetType, | ||
| pageType: "explore", | ||
| }); | ||
| }} | ||
| > | ||
| {props.title} | ||
| </Link> | ||
| </h3> | ||
| <p className="text-muted-foreground text-sm">{props.description}</p> | ||
|
|
||
| <ul className="mt-4 space-y-1 text-sm list-disc list-inside text-muted-foreground"> | ||
| {props.bullets.map((bullet) => ( | ||
| <li key={bullet}>{bullet}</li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or 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
63 changes: 63 additions & 0 deletions
63
apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| "use client"; | ||
|
|
||
| import { ArrowUpRightIcon } from "lucide-react"; | ||
| import Link from "next/link"; | ||
| import { reportTokenUpsellClicked } from "@/analytics/report"; | ||
| import { DismissibleAlert } from "@/components/blocks/dismissible-alert"; | ||
| import { Badge } from "@/components/ui/badge"; | ||
| import { Button } from "@/components/ui/button"; | ||
|
|
||
| export function TokenBanner(props: { type: "erc20" | "erc721" | "erc1155" }) { | ||
| const title = | ||
| props.type === "erc20" | ||
| ? "Launch Your Token Effortlessly" | ||
| : "Launch Your NFT Collection Effortlessly"; | ||
| const description = | ||
| props.type === "erc20" | ||
| ? "Deploy contract, set price and supply, airdrop tokens all in one seamless flow" | ||
| : props.type === "erc721" | ||
| ? "Deploy contract, upload NFTs, set price all in one seamless flow" | ||
| : "Deploy contract, upload NFTs, set prices and supply all in one seamless flow"; | ||
| const href = | ||
| props.type === "erc20" | ||
| ? "/team/~/~project/tokens/create/token" | ||
| : "/team/~/~project/tokens/create/nft"; | ||
|
|
||
| return ( | ||
| <DismissibleAlert | ||
| header={ | ||
| <Badge | ||
| variant="outline" | ||
| className="bg-background gap-1.5 py-1 px-2.5 h-auto mb-3" | ||
| > | ||
| <div className="rounded-full bg-primary size-1.5" /> | ||
| New | ||
| </Badge> | ||
| } | ||
| title={title} | ||
| className="container max-w-5xl mt-8" | ||
| preserveState={false} | ||
| description={description} | ||
| > | ||
| <Button | ||
| variant="default" | ||
| size="sm" | ||
| className="gap-2 rounded-full mt-4 px-6" | ||
| asChild | ||
| > | ||
| <Link | ||
| href={href} | ||
| target="_blank" | ||
| onClick={() => { | ||
| reportTokenUpsellClicked({ | ||
| assetType: props.type === "erc20" ? "coin" : "nft", | ||
| pageType: "deploy-contract", | ||
| }); | ||
| }} | ||
| > | ||
| Try Now <ArrowUpRightIcon className="size-3.5" /> | ||
| </Link> | ||
| </Button> | ||
| </DismissibleAlert> | ||
| ); | ||
| } | ||
This file contains hidden or 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 hidden or 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
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.