|
| 1 | +"use client"; |
| 2 | +import { Button } from "@/components/ui/button"; |
| 3 | +import { |
| 4 | + BookTextIcon, |
| 5 | + BookUpIcon, |
| 6 | + DatabaseIcon, |
| 7 | + DollarSignIcon, |
| 8 | + FuelIcon, |
| 9 | + PlusIcon, |
| 10 | + SparklesIcon, |
| 11 | + SquareChevronRightIcon, |
| 12 | + WalletIcon, |
| 13 | +} from "lucide-react"; |
| 14 | +import Link from "next/link"; |
| 15 | + |
| 16 | +export function NoProjectsFTUX(props: { |
| 17 | + openCreateProjectModal: () => void; |
| 18 | +}) { |
| 19 | + return ( |
| 20 | + <div className=""> |
| 21 | + <div className="flex flex-col justify-between gap-5 lg:flex-row lg:items-center"> |
| 22 | + <div> |
| 23 | + <h2 className="mb-1 font-semibold text-2xl tracking-tight"> |
| 24 | + Create a project |
| 25 | + </h2> |
| 26 | + <p className="text-muted-foreground"> |
| 27 | + Creating a project gives you access to thirdweb's services for |
| 28 | + building powerful web3 applications |
| 29 | + </p> |
| 30 | + </div> |
| 31 | + |
| 32 | + <Button onClick={props.openCreateProjectModal} className="gap-2"> |
| 33 | + <PlusIcon className="size-4" /> |
| 34 | + Create Project |
| 35 | + </Button> |
| 36 | + </div> |
| 37 | + <div className="h-6" /> |
| 38 | + <div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3"> |
| 39 | + {/* contract */} |
| 40 | + <FeatureCard |
| 41 | + icon={BookUpIcon} |
| 42 | + title="Deploy Contracts" |
| 43 | + description="Securely deploy, build, and manage contracts on any EVM chain." |
| 44 | + documentationUrl="https://portal.thirdweb.com/contracts" |
| 45 | + playgroundUrl={undefined} |
| 46 | + /> |
| 47 | + |
| 48 | + {/* in-app wallet */} |
| 49 | + <FeatureCard |
| 50 | + icon={WalletIcon} |
| 51 | + title="Create In-App Wallets" |
| 52 | + description="Create social, passkey, and mobile login options for easy user onboarding." |
| 53 | + documentationUrl="https://portal.thirdweb.com/connect/wallet/sign-in-methods/configure" |
| 54 | + playgroundUrl="https://playground.thirdweb.com/connect/in-app-wallet" |
| 55 | + /> |
| 56 | + |
| 57 | + {/* universal bridge */} |
| 58 | + <FeatureCard |
| 59 | + icon={DollarSignIcon} |
| 60 | + title="Fiat & cross-chain crypto payments " |
| 61 | + description="Bridge, swap, purchase cryptocurrencies and execute transactions with fiat or tokens via cross-chain routing" |
| 62 | + documentationUrl="https://portal.thirdweb.com/connect/pay/overview" |
| 63 | + playgroundUrl="https://playground.thirdweb.com/connect/pay" |
| 64 | + /> |
| 65 | + |
| 66 | + {/* account abstraction */} |
| 67 | + <FeatureCard |
| 68 | + icon={FuelIcon} |
| 69 | + title="Sponsor Gas Funds" |
| 70 | + description="Sponsor gas and enable secure app scope for your users using ERC-4337 compliant smart accounts." |
| 71 | + documentationUrl="https://portal.thirdweb.com/connect/account-abstraction/overview" |
| 72 | + playgroundUrl="https://playground.thirdweb.com/connect/account-abstraction/connect" |
| 73 | + /> |
| 74 | + |
| 75 | + {/* insight */} |
| 76 | + <FeatureCard |
| 77 | + icon={DatabaseIcon} |
| 78 | + title="Index Any EVM Chain" |
| 79 | + description="Index any EVM chain to aggregate and display onchain data in your application." |
| 80 | + documentationUrl="https://portal.thirdweb.com/insight" |
| 81 | + playgroundUrl="https://playground.thirdweb.com/insight" |
| 82 | + /> |
| 83 | + |
| 84 | + {/* nebula */} |
| 85 | + <FeatureCard |
| 86 | + icon={SparklesIcon} |
| 87 | + title="Integrate AI" |
| 88 | + description="Build AI powered crypto applications with advanced capabilities." |
| 89 | + documentationUrl="https://portal.thirdweb.com/nebula" |
| 90 | + playgroundUrl="https://nebula.thirdweb.com" |
| 91 | + /> |
| 92 | + </div> |
| 93 | + </div> |
| 94 | + ); |
| 95 | +} |
| 96 | + |
| 97 | +function FeatureCard(props: { |
| 98 | + icon: React.FC<{ className?: string }>; |
| 99 | + title: string; |
| 100 | + description: string; |
| 101 | + documentationUrl: string; |
| 102 | + playgroundUrl: string | undefined; |
| 103 | +}) { |
| 104 | + return ( |
| 105 | + <div className="rounded-lg border bg-card p-4"> |
| 106 | + <div className="mb-4 inline-flex rounded-full border p-3"> |
| 107 | + <props.icon className="size-5 text-muted-foreground" /> |
| 108 | + </div> |
| 109 | + <h3 className="mb-1 font-semibold text-lg">{props.title}</h3> |
| 110 | + <p className="mb-6 text-muted-foreground text-sm">{props.description}</p> |
| 111 | + <div className="mt-auto flex gap-2.5"> |
| 112 | + <Button variant="outline" size="sm" className="gap-2 text-xs" asChild> |
| 113 | + <Link href={props.documentationUrl} target="_blank"> |
| 114 | + <BookTextIcon className="size-3 text-muted-foreground" /> |
| 115 | + Documentation |
| 116 | + </Link> |
| 117 | + </Button> |
| 118 | + {props.playgroundUrl && ( |
| 119 | + <Button variant="outline" size="sm" className="gap-2 text-xs" asChild> |
| 120 | + <Link href={props.playgroundUrl} target="_blank"> |
| 121 | + <SquareChevronRightIcon className="size-3 text-muted-foreground" /> |
| 122 | + Playground |
| 123 | + </Link> |
| 124 | + </Button> |
| 125 | + )} |
| 126 | + </div> |
| 127 | + </div> |
| 128 | + ); |
| 129 | +} |
0 commit comments