+ Import an already deployed contract or deploy a contract from source
+ code to easily manage permissions, upload assets, and interact with
+ contract functions
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/dashboard/src/app/account/contracts/_components/DeployedContractsPage.tsx b/apps/dashboard/src/app/account/contracts/_components/DeployedContractsPage.tsx
index 5c0dd8acb0a..2f64bd51f62 100644
--- a/apps/dashboard/src/app/account/contracts/_components/DeployedContractsPage.tsx
+++ b/apps/dashboard/src/app/account/contracts/_components/DeployedContractsPage.tsx
@@ -3,7 +3,7 @@ import { ClientOnly } from "components/ClientOnly/ClientOnly";
import { Suspense } from "react";
import { ContractTable } from "../../../../components/contract-components/tables/contract-table";
import { DeployedContractsPageHeader } from "../DeployedContractsPageHeader";
-import { GetStartedWithContractsDeploy } from "./GetStartedWithContractsDeploy";
+import { DeployViaCLIOrImportCard } from "./DeployViaCLIOrImportCard";
import { getSortedDeployedContracts } from "./getSortedDeployedContracts";
export function DeployedContractsPage(props: {
@@ -21,6 +21,11 @@ export function DeployedContractsPage(props: {
}>
+
+
);
@@ -37,15 +42,6 @@ async function DeployedContractsPageAsync(props: {
authToken: props.authToken,
});
- if (deployedContracts.length === 0) {
- return (
-
- );
- }
-
return (
}>
[
- {
- title: "Build, deploy or import a contract",
- description:
- "Choose between deploying your own contract or import an existing one.",
- children: (
-
- ),
- completed: false, // because we only show this component if the user does not have any contracts
- },
- ],
- [props.teamId, props.projectId],
- );
-
- return (
-
- );
-}
-
-type ContentItem = {
- title: string;
- description: string;
- href?: string;
- onClick?: () => void;
-};
-
-type TabId = "explore" | "import" | "build" | "deploy";
-
-const DeployOptions = (props: {
- teamId: string;
- projectId: string;
-}) => {
- const [showImportModal, setShowImportModal] = useState(false);
- const router = useDashboardRouter();
- const trackEvent = useTrack();
-
- const content: Record = useMemo(
- () => ({
- explore: {
- title: "Ready-to-deploy",
- description:
- "Pick from our library of ready-to-deploy contracts and deploy to any EVM chain in just 1-click.",
- href: "/explore",
- },
- import: {
- title: "Import",
- description:
- "Import an already deployed contract to build apps on top of contract using thirdweb tools.",
- onClick: () => setShowImportModal(true),
- },
- build: {
- title: "Build your own",
- description:
- "Get started with the Solidity SDK to create custom contracts specific to your use case.",
- href: "/build",
- },
- deploy: {
- title: "Deploy from source",
- description:
- "Deploy your contract by using our interactive CLI. (Supports Hardhat, Forge, Truffle, and more)",
- href: "https://portal.thirdweb.com/cli",
- },
- }),
- [],
- );
-
- const [activeTab, setActiveTab] = useState("explore");
- const activeTabContent = content[activeTab];
-
- return (
-