Skip to content

Commit 00b6786

Browse files
committed
[TOOL-3378] Dashboard: Add Contract to Project UI updates
1 parent dceb47d commit 00b6786

File tree

41 files changed

+1120
-851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1120
-851
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Link from "next/link";
2+
import { cn } from "../../lib/utils";
3+
4+
type LinkProps = React.ComponentProps<typeof Link>;
5+
6+
export function UnderlineLink(props: LinkProps) {
7+
return (
8+
<Link
9+
{...props}
10+
className={cn(
11+
"underline decoration-muted-foreground/50 decoration-dotted underline-offset-[5px] hover:text-foreground hover:decoration-foreground hover:decoration-solid",
12+
props.className,
13+
)}
14+
/>
15+
);
16+
}

apps/dashboard/src/@3rdweb-sdk/react/hooks/useRegistry.ts

Lines changed: 0 additions & 149 deletions
This file was deleted.

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.client.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"use client";
22

33
import { useQuery } from "@tanstack/react-query";
4-
import type { ThirdwebContract } from "thirdweb";
4+
import type { ThirdwebClient, ThirdwebContract } from "thirdweb";
55
import type { ChainMetadata } from "thirdweb/chains";
6+
import type { MinimalTeamsAndProjects } from "../../../../../../components/contract-components/contract-deploy-form/add-to-project-card";
67
import { ErrorPage, LoadingPage } from "../_components/page-skeletons";
78
import { useContractPageMetadata } from "../_hooks/useContractPageMetadata";
89
import { getContractPageSidebarLinks } from "../_utils/getContractPageSidebarLinks";
@@ -13,6 +14,8 @@ export function ContractPageLayoutClient(props: {
1314
chainMetadata: ChainMetadata;
1415
contract: ThirdwebContract;
1516
children: React.ReactNode;
17+
teamsAndProjects: MinimalTeamsAndProjects | undefined;
18+
client: ThirdwebClient;
1619
}) {
1720
const metadataQuery = useContractPageMetadata(props.contract);
1821
const headerMetadataQuery = useQuery({

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import type { SidebarLink } from "@/components/blocks/Sidebar";
33
import { SidebarLayout } from "@/components/blocks/SidebarLayout";
44
import type { DashboardContractMetadata } from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata";
55
import { DeprecatedAlert } from "components/shared/DeprecatedAlert";
6-
import type { ThirdwebContract } from "thirdweb";
6+
import type { ThirdwebClient, ThirdwebContract } from "thirdweb";
77
import type { ChainMetadata } from "thirdweb/chains";
8+
import type { MinimalTeamsAndProjects } from "../../../../../../components/contract-components/contract-deploy-form/add-to-project-card";
89
import { ContractMetadata } from "./contract-metadata";
910
import { PrimaryDashboardButton } from "./primary-dashboard-button";
1011

@@ -14,6 +15,8 @@ export function ContractPageLayout(props: {
1415
children: React.ReactNode;
1516
sidebarLinks: SidebarLink[];
1617
dashboardContractMetadata: DashboardContractMetadata | undefined;
18+
client: ThirdwebClient;
19+
teamsAndProjects: MinimalTeamsAndProjects | undefined;
1720
externalLinks:
1821
| {
1922
name: string;
@@ -27,6 +30,8 @@ export function ContractPageLayout(props: {
2730
sidebarLinks,
2831
dashboardContractMetadata,
2932
externalLinks,
33+
teamsAndProjects,
34+
client,
3035
} = props;
3136

3237
return (
@@ -49,6 +54,8 @@ export function ContractPageLayout(props: {
4954
chainSlug: chainMetadata.slug,
5055
contractAddress: contract.address,
5156
}}
57+
teamsAndProjects={teamsAndProjects}
58+
client={client}
5259
/>
5360
</div>
5461
<DeprecatedAlert chain={chainMetadata} />

0 commit comments

Comments
 (0)