Skip to content

Commit d795415

Browse files
committed
Dashboard: Hide cross-chain tab on non-modular contract pages
1 parent c331d18 commit d795415

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractPageSidebarLinks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export function getContractPageSidebarLinks(data: {
3535
exactMatch: true,
3636
href: `${layoutPrefix}/cross-chain`,
3737
label: "Cross Chain (Beta)",
38+
hide: !data.metadata.isModularCore,
3839
},
3940
{
4041
exactMatch: true,

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/shared-cross-chain-page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ export async function SharedCrossChainPage(props: {
6767
const isModularCore = (await getContractPageMetadata(serverContract))
6868
.isModularCore;
6969

70+
if (!isModularCore) {
71+
redirectToContractLandingPage({
72+
chainIdOrSlug: props.chainIdOrSlug,
73+
contractAddress: props.contractAddress,
74+
projectMeta: props.projectMeta,
75+
});
76+
}
77+
7078
let twCloneFactoryContract: Readonly<
7179
ContractOptions<[], `0x${string}`>
7280
> | null = null;

0 commit comments

Comments
 (0)