Skip to content

Commit 00a6a56

Browse files
committed
Move Contract page components to app router folder #2 (no code change) (#5073)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR refactors the structure of the dashboard application, changing the import paths for several components and pages to a more localized format. It also moves certain components related to contract management and permissions to new locations. ### Detailed summary - Updated import paths for various pages and components to local paths. - Moved `ContractSplitPage` to `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/ContractSplitPage.tsx`. - Moved `DistributeButton` to `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/components/distribute-button.tsx`. - Moved `ContractProposalsPage` to `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/ContractProposalsPage.tsx`. - Moved `ContractEditModulesPage` to `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/ContractEditModulesPage.tsx`. - Moved `ContractPermissionsPage` to `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/ContractPermissionsPage.tsx`. - Moved `ContractExplorerPage` to `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/explorer/ContractExplorerPage.tsx`. - Moved `ContractSettingsPage` to `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/ContractSettingsPage.tsx`. - Updated import statements in `events-feed.tsx` and `permissions/index.tsx` to reflect new paths. - Adjusted type imports in various components to align with the new structure. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 7855c3e commit 00a6a56

33 files changed

+16
-16
lines changed

apps/dashboard/src/contract-ui/tabs/events/components/events-feed.tsx renamed to apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/events/events-feed.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
Tooltip,
2525
} from "@chakra-ui/react";
2626
import { AnimatePresence, motion } from "framer-motion";
27+
import { useChainSlug } from "hooks/chains/chainSlug";
2728
import { useClipboard } from "hooks/useClipboard";
2829
import { ChevronDownIcon, CircleHelpIcon, CopyIcon } from "lucide-react";
2930
import { useSearchParams } from "next/navigation";
@@ -39,7 +40,6 @@ import {
3940
Heading,
4041
Text,
4142
} from "tw-components";
42-
import { useChainSlug } from "../../../../hooks/chains/chainSlug";
4343

4444
interface EventsFeedProps {
4545
contract: ThirdwebContract;

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/events/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { notFound } from "next/navigation";
2-
import { EventsFeed } from "../../../../../../contract-ui/tabs/events/components/events-feed";
32
import { getContractPageParamsInfo } from "../_utils/getContractFromParams";
3+
import { EventsFeed } from "./events-feed";
44

55
export default async function Page(props: {
66
params: {

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/explorer/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
22
import { CircleAlertIcon } from "lucide-react";
33
import { notFound } from "next/navigation";
44
import { resolveContractAbi } from "thirdweb/contract";
5-
import { ContractExplorerPage } from "../../../../../../contract-ui/tabs/explorer/page";
65
import { getContractPageParamsInfo } from "../_utils/getContractFromParams";
6+
import { ContractExplorerPage } from "./ContractExplorerPage";
77

88
export default async function Page(props: {
99
params: {

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { ChakraProviderSetup } from "@/components/ChakraProviderSetup";
22
import { SidebarLayout } from "@/components/blocks/SidebarLayout";
33
import { ContractMetadata } from "components/custom-contract/contract-header/contract-metadata";
44
import { DeprecatedAlert } from "components/shared/DeprecatedAlert";
5-
import { PrimaryDashboardButton } from "contract-ui/components/primary-dashboard-button";
65
import type { Metadata } from "next";
76
import { getContractMetadata } from "thirdweb/extensions/common";
87
import { resolveFunctionSelectors } from "../../../../../lib/selectors";
98
import { shortenIfAddress } from "../../../../../utils/usedapp-external";
109
import { ConfigureCustomChain } from "./ConfigureCustomChain";
10+
import { PrimaryDashboardButton } from "./_components/primary-dashboard-button";
1111
import { supportedERCs } from "./_utils/detectedFeatures/supportedERCs";
1212
import { getContractPageParamsInfo } from "./_utils/getContractFromParams";
1313
import { getContractPageMetadata } from "./_utils/getContractPageMetadata";

0 commit comments

Comments
 (0)