From 0b671fe8fcc925c9d72665a9344e0123dd08d5e6 Mon Sep 17 00:00:00 2001 From: MananTank Date: Tue, 15 Oct 2024 22:02:47 +0000 Subject: [PATCH] Move Account Page components in app router folder (No Code Change) (#5042) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem solved Short description of the bug fixed or feature added --- ## PR-Codex overview This PR focuses on refactoring the code structure for better organization and maintainability, particularly in the `account` section of the dashboard. It modifies import paths and updates component references. ### Detailed summary - Changed import path for `AccountPage` in `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/page.tsx`. - Updated import path for `NFTCards` in `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx`. - Modified import paths for `useV5DashboardChain` and `StoredChain` in `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/deposit-native.tsx`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../[chain_id]/[contractAddress]/account/AccountPage.tsx} | 0 .../[contractAddress]}/account/components/account-balance.tsx | 0 .../[contractAddress]}/account/components/deposit-native.tsx | 4 ++-- .../[contractAddress]}/account/components/nfts-owned.tsx | 2 +- .../(chain)/[chain_id]/[contractAddress]/account/page.tsx | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename apps/dashboard/src/{contract-ui/tabs/account/page.tsx => app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/AccountPage.tsx} (100%) rename apps/dashboard/src/{contract-ui/tabs => app/(dashboard)/(chain)/[chain_id]/[contractAddress]}/account/components/account-balance.tsx (100%) rename apps/dashboard/src/{contract-ui/tabs => app/(dashboard)/(chain)/[chain_id]/[contractAddress]}/account/components/deposit-native.tsx (93%) rename apps/dashboard/src/{contract-ui/tabs => app/(dashboard)/(chain)/[chain_id]/[contractAddress]}/account/components/nfts-owned.tsx (90%) diff --git a/apps/dashboard/src/contract-ui/tabs/account/page.tsx b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/AccountPage.tsx similarity index 100% rename from apps/dashboard/src/contract-ui/tabs/account/page.tsx rename to apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/AccountPage.tsx diff --git a/apps/dashboard/src/contract-ui/tabs/account/components/account-balance.tsx b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/account-balance.tsx similarity index 100% rename from apps/dashboard/src/contract-ui/tabs/account/components/account-balance.tsx rename to apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/account-balance.tsx diff --git a/apps/dashboard/src/contract-ui/tabs/account/components/deposit-native.tsx b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/deposit-native.tsx similarity index 93% rename from apps/dashboard/src/contract-ui/tabs/account/components/deposit-native.tsx rename to apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/deposit-native.tsx index f9dc8386c63..f691883f234 100644 --- a/apps/dashboard/src/contract-ui/tabs/account/components/deposit-native.tsx +++ b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/deposit-native.tsx @@ -3,12 +3,12 @@ import { useThirdwebClient } from "@/constants/thirdweb.client"; import { Input } from "@chakra-ui/react"; import { TransactionButton } from "components/buttons/TransactionButton"; +import { useV5DashboardChain } from "lib/v5-adapter"; import { type ChangeEvent, useState } from "react"; +import type { StoredChain } from "stores/chainStores"; import { prepareTransaction, toWei } from "thirdweb"; import { useSendAndConfirmTransaction } from "thirdweb/react"; import { Card } from "tw-components"; -import { useV5DashboardChain } from "../../../../lib/v5-adapter"; -import type { StoredChain } from "../../../../stores/chainStores"; interface DepositNativeProps { address: string; diff --git a/apps/dashboard/src/contract-ui/tabs/account/components/nfts-owned.tsx b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx similarity index 90% rename from apps/dashboard/src/contract-ui/tabs/account/components/nfts-owned.tsx rename to apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx index d4ff10dca0c..b7bd92ff6d0 100644 --- a/apps/dashboard/src/contract-ui/tabs/account/components/nfts-owned.tsx +++ b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx @@ -3,7 +3,7 @@ import { useWalletNFTs } from "@3rdweb-sdk/react"; import type { ThirdwebContract } from "thirdweb"; import { Text } from "tw-components"; -import { NFTCards } from "../../../../app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/NFTCards"; +import { NFTCards } from "../../_components/NFTCards"; interface NftsOwnedProps { contract: ThirdwebContract; diff --git a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/page.tsx b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/page.tsx index 0f5adf84b84..a465679cb47 100644 --- a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/page.tsx +++ b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/page.tsx @@ -1,7 +1,7 @@ import { notFound, redirect } from "next/navigation"; -import { AccountPage } from "../../../../../../contract-ui/tabs/account/page"; import { getContractPageParamsInfo } from "../_utils/getContractFromParams"; import { getContractPageMetadata } from "../_utils/getContractPageMetadata"; +import { AccountPage } from "./AccountPage"; export default async function Page(props: { params: {