From 9b1466d06d96f846a87f525de59d5e721779b25c Mon Sep 17 00:00:00 2001 From: MananTank Date: Fri, 30 May 2025 18:51:17 +0000 Subject: [PATCH] Dashboard import paths cleanup (#7229) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR focuses on updating import paths and enhancing code structure across various files in the `apps/dashboard` directory. It introduces new imports and removes outdated ones to streamline the codebase. ### Detailed summary - Updated import paths for `getClientThirdwebClient` and `serverThirdwebClient` to use absolute paths. - Added imports for `useAllChainsData`, `useTrack`, and `RenewSubscriptionButton` in multiple files. - Removed unused or redundant imports throughout the codebase. - Enhanced consistency in import statements across components. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../src/@/components/blocks/NetworkSelectors.tsx | 4 ++-- .../src/@/components/blocks/TokenSelector.tsx | 4 ++-- .../src/@/components/blocks/charts/area-chart.tsx | 10 +++++----- .../src/@/components/blocks/charts/bar-chart.tsx | 8 ++++---- .../src/@/components/blocks/dismissible-alert.tsx | 2 +- .../dashboard/src/@/components/blocks/pricing-card.tsx | 6 +++--- apps/dashboard/src/@/components/ui/NavLink.tsx | 2 +- apps/dashboard/src/@/lib/time.ts | 4 ++-- .../react/components/connect-wallet/index.tsx | 4 ++-- .../routes/components/server/routelist-card.tsx | 2 +- .../(chain)/[chain_id]/(chainPage)/opengraph-image.tsx | 2 +- .../(chain)/[chain_id]/(chainPage)/page.tsx | 2 +- .../public-pages/erc20/_components/ContractHeader.tsx | 4 ++-- .../contracts/deploy/[compiler_uri]/page.tsx | 2 +- .../(dashboard)/profile/[addressOrEns]/ProfileUI.tsx | 2 +- .../profile/[addressOrEns]/opengraph-image.tsx | 2 +- .../components/publish-based-deploy.tsx | 2 +- .../src/app/(app)/(dashboard)/support/page.tsx | 2 +- .../components/TransactionSimulator.tsx | 2 +- apps/dashboard/src/app/(app)/account/layout.tsx | 2 +- apps/dashboard/src/app/(app)/account/settings/page.tsx | 2 +- apps/dashboard/src/app/(app)/account/wallets/page.tsx | 2 +- apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts | 2 +- .../src/app/(app)/components/TeamPlanBadge.tsx | 2 +- .../src/app/(app)/drops/[slug]/opengraph-image.tsx | 2 +- apps/dashboard/src/app/(app)/drops/[slug]/page.tsx | 2 +- .../get-started/team/[team_slug]/add-members/page.tsx | 2 +- .../app/(app)/get-started/team/[team_slug]/layout.tsx | 2 +- .../app/(app)/get-started/team/[team_slug]/page.tsx | 2 +- .../onboarding/LinkWalletPrompt/LinkWalletPrompt.tsx | 2 +- .../app/(app)/login/onboarding/account-onboarding.tsx | 2 +- apps/dashboard/src/app/(app)/login/page.tsx | 2 +- .../src/app/(app)/project-showcase/[slug]/page.tsx | 2 +- apps/dashboard/src/app/(app)/project-showcase/page.tsx | 2 +- apps/dashboard/src/app/(app)/providers.tsx | 2 +- .../src/app/(app)/team/[team_slug]/(team)/layout.tsx | 2 +- .../configuration/partners/[partner_id]/edit/page.tsx | 2 +- .../app/(app)/team/[team_slug]/(team)/~/usage/page.tsx | 2 +- .../(sidebar)/engine/cloud/server-wallets/page.tsx | 2 +- .../[team_slug]/[project_slug]/(sidebar)/layout.tsx | 2 +- .../team/[team_slug]/[project_slug]/(sidebar)/page.tsx | 2 +- .../(marketplace)/direct-listings/page.tsx | 2 +- .../(marketplace)/english-auctions/page.tsx | 2 +- .../[chainIdOrSlug]/[contractAddress]/account/page.tsx | 2 +- .../[contractAddress]/settings/page.tsx | 2 +- .../[chainIdOrSlug]/[contractAddress]/split/page.tsx | 2 +- .../[chainIdOrSlug]/[contractAddress]/tokens/page.tsx | 2 +- .../(app)/components/AssetsSection/AssetsSection.tsx | 2 +- .../(app)/components/CustomChat/CustomChatButton.tsx | 4 ++-- .../app/nebula-app/(app)/components/Swap/common.tsx | 2 +- .../TransactionsSection/TransactionsSection.tsx | 2 +- apps/dashboard/src/app/pay/[id]/page.tsx | 2 +- .../dashboard/src/components/ClientOnly/ClientOnly.tsx | 2 +- apps/dashboard/src/components/analytics/stat.tsx | 2 +- .../src/components/buttons/MismatchButton.tsx | 2 +- .../configure-networks/ConfigureNetworkForm.tsx | 2 +- .../configure-networks/Form/NetworkIdInput.tsx | 2 +- .../contract-components/contract-table/index.tsx | 2 +- .../contract-components/published-contract/index.tsx | 4 ++-- .../contract-components/shared/contract-id-image.tsx | 2 +- .../contract-components/tables/contract-table.tsx | 6 +++--- apps/dashboard/src/components/icons/ChainIcon.tsx | 2 +- .../src/components/selects/CustomChainRenderer.tsx | 2 +- .../src/components/selects/NetworkSelectDropdown.tsx | 2 +- .../src/components/selects/NetworkSelectorButton.tsx | 2 +- .../src/components/shared/CurrencySelector.tsx | 2 +- .../TotalSponsoredChartCard.tsx | 2 +- .../smart-wallets/AccountFactories/index.tsx | 2 +- .../smart-wallets/SponsorshipPolicies/index.tsx | 4 ++-- apps/dashboard/src/constants/schemas.ts | 2 +- .../contract-ui/tabs/code/components/code-overview.tsx | 2 +- .../src/data/analytics/contract-event-breakdown.ts | 2 +- apps/dashboard/src/data/analytics/contract-events.ts | 2 +- .../src/data/analytics/contract-function-breakdown.ts | 2 +- .../src/data/analytics/contract-wallet-analytics.ts | 2 +- .../src/data/analytics/total-contract-transactions.ts | 2 +- apps/dashboard/src/hooks/tokens/tokens.ts | 2 +- apps/dashboard/src/lib/defineDashboardChain.ts | 2 +- apps/dashboard/src/lib/rpc.ts | 2 +- apps/dashboard/src/lib/v5-adapter.ts | 2 +- apps/dashboard/src/lib/wallet/nfts/alchemy.ts | 2 +- apps/dashboard/src/lib/wallet/nfts/moralis.ts | 2 +- apps/dashboard/src/stories/utils.tsx | 2 +- apps/dashboard/src/utils/pricing.tsx | 2 +- 84 files changed, 103 insertions(+), 103 deletions(-) diff --git a/apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx b/apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx index 9f0dde55afa..5c46846fc54 100644 --- a/apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx +++ b/apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx @@ -3,10 +3,10 @@ import { MultiSelect } from "@/components/blocks/multi-select"; import { SelectWithSearch } from "@/components/blocks/select-with-search"; import { Badge } from "@/components/ui/badge"; +import { ChainIconClient } from "components/icons/ChainIcon"; +import { useAllChainsData } from "hooks/chains/allChains"; import { useCallback, useMemo } from "react"; import type { ThirdwebClient } from "thirdweb"; -import { ChainIconClient } from "../../../components/icons/ChainIcon"; -import { useAllChainsData } from "../../../hooks/chains/allChains"; function cleanChainName(chainName: string) { return chainName.replace("Mainnet", ""); diff --git a/apps/dashboard/src/@/components/blocks/TokenSelector.tsx b/apps/dashboard/src/@/components/blocks/TokenSelector.tsx index de02913dcfa..8d26aa3168e 100644 --- a/apps/dashboard/src/@/components/blocks/TokenSelector.tsx +++ b/apps/dashboard/src/@/components/blocks/TokenSelector.tsx @@ -1,3 +1,5 @@ +import { useAllChainsData } from "hooks/chains/allChains"; +import { useTokensData } from "hooks/tokens/tokens"; import { useCallback, useMemo } from "react"; import { NATIVE_TOKEN_ADDRESS, @@ -5,8 +7,6 @@ import { getAddress, } from "thirdweb"; import { shortenAddress } from "thirdweb/utils"; -import { useAllChainsData } from "../../../hooks/chains/allChains"; -import { useTokensData } from "../../../hooks/tokens/tokens"; import { replaceIpfsUrl } from "../../../lib/sdk"; import { fallbackChainIcon } from "../../../utils/chain-icons"; import type { TokenMetadata } from "../../api/universal-bridge/tokens"; diff --git a/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx b/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx index fab6079ee65..5ea5ddb4cd1 100644 --- a/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx +++ b/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx @@ -15,14 +15,14 @@ import { ChartTooltip, ChartTooltipContent, } from "@/components/ui/chart"; -import { formatDate } from "date-fns"; -import { useMemo } from "react"; -import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts"; +import { cn } from "@/lib/utils"; import { EmptyChartState, LoadingChartState, -} from "../../../../components/analytics/empty-chart-state"; -import { cn } from "../../../lib/utils"; +} from "components/analytics/empty-chart-state"; +import { formatDate } from "date-fns"; +import { useMemo } from "react"; +import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts"; type ThirdwebAreaChartProps = { header?: { diff --git a/apps/dashboard/src/@/components/blocks/charts/bar-chart.tsx b/apps/dashboard/src/@/components/blocks/charts/bar-chart.tsx index 799ed703dc5..26270091c10 100644 --- a/apps/dashboard/src/@/components/blocks/charts/bar-chart.tsx +++ b/apps/dashboard/src/@/components/blocks/charts/bar-chart.tsx @@ -17,13 +17,13 @@ import { ChartTooltip, ChartTooltipContent, } from "@/components/ui/chart"; -import { formatDate } from "date-fns"; -import { useMemo } from "react"; +import { cn } from "@/lib/utils"; import { EmptyChartState, LoadingChartState, -} from "../../../../components/analytics/empty-chart-state"; -import { cn } from "../../../lib/utils"; +} from "components/analytics/empty-chart-state"; +import { formatDate } from "date-fns"; +import { useMemo } from "react"; type ThirdwebBarChartProps = { // metadata diff --git a/apps/dashboard/src/@/components/blocks/dismissible-alert.tsx b/apps/dashboard/src/@/components/blocks/dismissible-alert.tsx index 3ed6bba4cb5..daa89d1025a 100644 --- a/apps/dashboard/src/@/components/blocks/dismissible-alert.tsx +++ b/apps/dashboard/src/@/components/blocks/dismissible-alert.tsx @@ -1,7 +1,7 @@ "use client"; +import { useLocalStorage } from "hooks/useLocalStorage"; import { XIcon } from "lucide-react"; -import { useLocalStorage } from "../../../hooks/useLocalStorage"; import { Button } from "../ui/button"; export function DismissibleAlert(props: { diff --git a/apps/dashboard/src/@/components/blocks/pricing-card.tsx b/apps/dashboard/src/@/components/blocks/pricing-card.tsx index c3cfbb76eb1..47ab77c4fd8 100644 --- a/apps/dashboard/src/@/components/blocks/pricing-card.tsx +++ b/apps/dashboard/src/@/components/blocks/pricing-card.tsx @@ -4,13 +4,13 @@ import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; +import { RenewSubscriptionButton } from "components/settings/Account/Billing/renew-subscription/renew-subscription-button"; +import { useTrack } from "hooks/analytics/useTrack"; import { CheckIcon, DollarSignIcon } from "lucide-react"; import Link from "next/link"; import type React from "react"; +import { remainingDays } from "utils/date-utils"; import { TEAM_PLANS } from "utils/pricing"; -import { RenewSubscriptionButton } from "../../../components/settings/Account/Billing/renew-subscription/renew-subscription-button"; -import { useTrack } from "../../../hooks/analytics/useTrack"; -import { remainingDays } from "../../../utils/date-utils"; import type { ProductSKU } from "../../lib/billing"; import { CheckoutButton } from "../billing"; diff --git a/apps/dashboard/src/@/components/ui/NavLink.tsx b/apps/dashboard/src/@/components/ui/NavLink.tsx index c65257e0108..ecde05aebb4 100644 --- a/apps/dashboard/src/@/components/ui/NavLink.tsx +++ b/apps/dashboard/src/@/components/ui/NavLink.tsx @@ -1,9 +1,9 @@ "use client"; import { cn } from "@/lib/utils"; +import { useTrack } from "hooks/analytics/useTrack"; import Link from "next/link"; import { usePathname } from "next/navigation"; -import { useTrack } from "../../../hooks/analytics/useTrack"; export type NavButtonProps = { className?: string; diff --git a/apps/dashboard/src/@/lib/time.ts b/apps/dashboard/src/@/lib/time.ts index 07ec2a7d527..43ed6aad84f 100644 --- a/apps/dashboard/src/@/lib/time.ts +++ b/apps/dashboard/src/@/lib/time.ts @@ -1,9 +1,9 @@ -import { differenceInCalendarDays } from "date-fns"; import { type DurationId, type Range, getLastNDaysRange, -} from "../../components/analytics/date-range-selector"; +} from "components/analytics/date-range-selector"; +import { differenceInCalendarDays } from "date-fns"; export function normalizeTime(date: Date) { const newDate = new Date(date); diff --git a/apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx b/apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx index 34129df60e9..76b19ad283f 100644 --- a/apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx +++ b/apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx @@ -3,9 +3,11 @@ import { Button } from "@/components/ui/button"; import { useStore } from "@/lib/reactive"; import { getSDKTheme } from "app/(app)/components/sdk-component-theme"; +import { LazyConfigureNetworkModal } from "components/configure-networks/LazyConfigureNetworkModal"; import { CustomChainRenderer } from "components/selects/CustomChainRenderer"; import { mapV4ChainToV5Chain } from "contexts/map-chains"; import { useTrack } from "hooks/analytics/useTrack"; +import { useAllChainsData } from "hooks/chains/allChains"; import { useTheme } from "next-themes"; import Image from "next/image"; import Link from "next/link"; @@ -20,8 +22,6 @@ import { } from "thirdweb/react"; import { useFavoriteChainIds } from "../../../../app/(app)/(dashboard)/(chain)/components/client/star-button"; import { doLogout } from "../../../../app/(app)/login/auth-actions"; -import { LazyConfigureNetworkModal } from "../../../../components/configure-networks/LazyConfigureNetworkModal"; -import { useAllChainsData } from "../../../../hooks/chains/allChains"; import { type StoredChain, addRecentlyUsedChainId, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-card.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-card.tsx index 09063f4976f..7968a7d7854 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-card.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-card.tsx @@ -1,8 +1,8 @@ import { Card, CardContent, CardHeader } from "@/components/ui/card"; +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; import { defineChain } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; -import { serverThirdwebClient } from "../../../../../../../@/constants/thirdweb-client.server"; type RouteListCardProps = { originChainId: number; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/opengraph-image.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/opengraph-image.tsx index 593d735cc44..6d75fdc8cea 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/opengraph-image.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/opengraph-image.tsx @@ -1,7 +1,7 @@ +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { ImageResponse } from "next/og"; import { download } from "thirdweb/storage"; import { fetchChain } from "utils/fetchChain"; -import { serverThirdwebClient } from "../../../../../../@/constants/thirdweb-client.server"; // Route segment config export const runtime = "edge"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx index 7442b3d4b1c..262494d5641 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx @@ -1,5 +1,5 @@ +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { CircleAlertIcon } from "lucide-react"; -import { getClientThirdwebClient } from "../../../../../../@/constants/thirdweb-client.client"; import { getRawAccount } from "../../../../account/settings/getAccount"; import { getChain, getChainMetadata } from "../../utils"; import NextSteps from "./components/client/NextSteps"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.tsx index f5c02f413cf..5695d16e74a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.tsx @@ -5,10 +5,12 @@ import { ToolTipLabel } from "@/components/ui/tooltip"; import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; import { cn } from "@/lib/utils"; import { ChainIconClient } from "components/icons/ChainIcon"; +import { DiscordIcon } from "components/icons/brand-icons/DiscordIcon"; import { GithubIcon } from "components/icons/brand-icons/GithubIcon"; import { InstagramIcon } from "components/icons/brand-icons/InstagramIcon"; import { LinkedInIcon } from "components/icons/brand-icons/LinkedinIcon"; import { RedditIcon } from "components/icons/brand-icons/RedditIcon"; +import { TelegramIcon } from "components/icons/brand-icons/TelegramIcon"; import { TiktokIcon } from "components/icons/brand-icons/TiktokIcon"; import { XIcon as TwitterXIcon } from "components/icons/brand-icons/XIcon"; import { YoutubeIcon } from "components/icons/brand-icons/YoutubeIcon"; @@ -17,8 +19,6 @@ import Link from "next/link"; import { useMemo } from "react"; import type { ThirdwebContract } from "thirdweb"; import type { ChainMetadata } from "thirdweb/chains"; -import { DiscordIcon } from "../../../../../../../../../components/icons/brand-icons/DiscordIcon"; -import { TelegramIcon } from "../../../../../../../../../components/icons/brand-icons/TelegramIcon"; const platformToIcons: Record> = { twitter: TwitterXIcon, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx index c7e31413b3d..8315c85a091 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx @@ -1,6 +1,6 @@ +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { notFound } from "next/navigation"; import { fetchDeployMetadata } from "thirdweb/contract"; -import { serverThirdwebClient } from "../../../../../../@/constants/thirdweb-client.server"; import { DeployContractInfo } from "../../../published-contract/components/contract-info"; import { DeployFormForUri } from "../../../published-contract/components/uri-based-deploy"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/ProfileUI.tsx b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/ProfileUI.tsx index 6d3a36bd3ab..5261e28667d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/ProfileUI.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/ProfileUI.tsx @@ -1,8 +1,8 @@ import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { fetchPublishedContracts } from "components/contract-components/fetchPublishedContracts"; import { Suspense } from "react"; import type { ThirdwebClient } from "thirdweb"; -import { serverThirdwebClient } from "../../../../../@/constants/thirdweb-client.server"; import { ProfileHeader } from "./components/profile-header"; import { PublishedContracts } from "./components/published-contracts"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/opengraph-image.tsx b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/opengraph-image.tsx index 860a2e625a5..c00d20fe57a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/opengraph-image.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/opengraph-image.tsx @@ -1,11 +1,11 @@ import { GradientBlobbie } from "@/components/blocks/Avatars/GradientBlobbie"; +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; /* eslint-disable @next/next/no-img-element */ import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; import { notFound } from "next/navigation"; import { ImageResponse } from "next/og"; import { resolveAvatar } from "thirdweb/extensions/ens"; import { shortenIfAddress } from "utils/usedapp-external"; -import { serverThirdwebClient } from "../../../../../@/constants/thirdweb-client.server"; import { resolveAddressAndEns } from "./resolveAddressAndEns"; export const runtime = "edge"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/publish-based-deploy.tsx b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/publish-based-deploy.tsx index 6ee2b237f86..f1cd76fe11d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/publish-based-deploy.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/publish-based-deploy.tsx @@ -1,3 +1,4 @@ +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { fetchPublishedContractVersion, fetchPublishedContractVersions, @@ -6,7 +7,6 @@ import { ZERO_FEE_VERSIONS } from "constants/fee-config"; import { isAddress } from "thirdweb"; import { fetchDeployMetadata } from "thirdweb/contract"; import { resolveAddress } from "thirdweb/extensions/ens"; -import { serverThirdwebClient } from "../../../../../@/constants/thirdweb-client.server"; import { DeployContractHeader } from "./contract-header"; import { DeployFormForUri } from "./uri-based-deploy"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/support/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/page.tsx index 9530a403357..bd88792bc23 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/support/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/support/page.tsx @@ -1,3 +1,4 @@ +import { getTeams } from "@/api/team"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { BookOpenIcon, ChevronRightIcon } from "lucide-react"; @@ -9,7 +10,6 @@ import contractsIcon from "../../../../../public/assets/support/contracts.png"; import engineIcon from "../../../../../public/assets/support/engine.png"; import miscIcon from "../../../../../public/assets/support/misc.svg"; import connectIcon from "../../../../../public/assets/support/wallets.png"; -import { getTeams } from "../../../../@/api/team"; import { CustomChatButton } from "../../../nebula-app/(app)/components/CustomChat/CustomChatButton"; import { getAuthToken, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/tools/transaction-simulator/components/TransactionSimulator.tsx b/apps/dashboard/src/app/(app)/(dashboard)/tools/transaction-simulator/components/TransactionSimulator.tsx index ada6f442ee9..b752e403afe 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/tools/transaction-simulator/components/TransactionSimulator.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/tools/transaction-simulator/components/TransactionSimulator.tsx @@ -8,6 +8,7 @@ import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Textarea } from "@/components/ui/textarea"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import type { Abi, AbiFunction } from "abitype"; import { useV5DashboardChain } from "lib/v5-adapter"; import { ArrowDownIcon, WalletIcon } from "lucide-react"; @@ -24,7 +25,6 @@ import { import { resolveContractAbi } from "thirdweb/contract"; import { useActiveAccount } from "thirdweb/react"; import { parseAbiParams } from "thirdweb/utils"; -import { getClientThirdwebClient } from "../../../../../../@/constants/thirdweb-client.client"; import { ShareButton } from "../../components/share"; export type SimulateTransactionForm = { diff --git a/apps/dashboard/src/app/(app)/account/layout.tsx b/apps/dashboard/src/app/(app)/account/layout.tsx index 5c9842db322..9021b15631a 100644 --- a/apps/dashboard/src/app/(app)/account/layout.tsx +++ b/apps/dashboard/src/app/(app)/account/layout.tsx @@ -2,11 +2,11 @@ import { getProjects } from "@/api/projects"; import { type Team, getTeams } from "@/api/team"; import { AppFooter } from "@/components/blocks/app-footer"; import { TabPathLinks } from "@/components/ui/tabs"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { AnnouncementBanner } from "components/notices/AnnouncementBanner"; import type React from "react"; import type { ThirdwebClient } from "thirdweb"; -import { getClientThirdwebClient } from "../../../@/constants/thirdweb-client.client"; import { getAuthToken, getAuthTokenWalletAddress, diff --git a/apps/dashboard/src/app/(app)/account/settings/page.tsx b/apps/dashboard/src/app/(app)/account/settings/page.tsx index bcdedf745a0..7b28398f7e7 100644 --- a/apps/dashboard/src/app/(app)/account/settings/page.tsx +++ b/apps/dashboard/src/app/(app)/account/settings/page.tsx @@ -1,5 +1,5 @@ import { getDefaultTeam } from "@/api/team"; -import { getClientThirdwebClient } from "../../../../@/constants/thirdweb-client.client"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { getAuthToken } from "../../api/lib/getAuthToken"; import { loginRedirect } from "../../login/loginRedirect"; import { AccountSettingsPage } from "./AccountSettingsPage"; diff --git a/apps/dashboard/src/app/(app)/account/wallets/page.tsx b/apps/dashboard/src/app/(app)/account/wallets/page.tsx index e99257b71c8..71e5df01e8b 100644 --- a/apps/dashboard/src/app/(app)/account/wallets/page.tsx +++ b/apps/dashboard/src/app/(app)/account/wallets/page.tsx @@ -1,5 +1,5 @@ import { getLinkedWallets } from "@/api/linked-wallets"; -import { getClientThirdwebClient } from "../../../../@/constants/thirdweb-client.client"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { getAuthToken } from "../../api/lib/getAuthToken"; import { loginRedirect } from "../../login/loginRedirect"; import { getValidAccount } from "../settings/getAccount"; diff --git a/apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts b/apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts index c28dc8e5695..40f9ad01aae 100644 --- a/apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts +++ b/apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts @@ -1,7 +1,7 @@ import { COOKIE_ACTIVE_ACCOUNT, COOKIE_PREFIX_TOKEN } from "@/constants/cookie"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { LAST_USED_TEAM_ID } from "constants/cookies"; import { cookies } from "next/headers"; -import { getClientThirdwebClient } from "../../../../@/constants/thirdweb-client.client"; export async function getAuthToken() { const cookiesManager = await cookies(); diff --git a/apps/dashboard/src/app/(app)/components/TeamPlanBadge.tsx b/apps/dashboard/src/app/(app)/components/TeamPlanBadge.tsx index a18315e9d96..d87cf8ceaef 100644 --- a/apps/dashboard/src/app/(app)/components/TeamPlanBadge.tsx +++ b/apps/dashboard/src/app/(app)/components/TeamPlanBadge.tsx @@ -3,8 +3,8 @@ import type { Team } from "@/api/team"; import { Badge, type BadgeProps } from "@/components/ui/badge"; import { cn } from "@/lib/utils"; +import { useTrack } from "hooks/analytics/useTrack"; import Link from "next/link"; -import { useTrack } from "../../../hooks/analytics/useTrack"; const teamPlanToBadgeVariant: Record< Team["billingPlan"], diff --git a/apps/dashboard/src/app/(app)/drops/[slug]/opengraph-image.tsx b/apps/dashboard/src/app/(app)/drops/[slug]/opengraph-image.tsx index 33fa0441898..e1620d065af 100644 --- a/apps/dashboard/src/app/(app)/drops/[slug]/opengraph-image.tsx +++ b/apps/dashboard/src/app/(app)/drops/[slug]/opengraph-image.tsx @@ -1,7 +1,7 @@ +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { ImageResponse } from "next/og"; import { download } from "thirdweb/storage"; import { fetchChain } from "utils/fetchChain"; -import { serverThirdwebClient } from "../../../../@/constants/thirdweb-client.server"; import { DROP_PAGES } from "./data"; // Route segment config diff --git a/apps/dashboard/src/app/(app)/drops/[slug]/page.tsx b/apps/dashboard/src/app/(app)/drops/[slug]/page.tsx index 27f5f6e3325..214301315e2 100644 --- a/apps/dashboard/src/app/(app)/drops/[slug]/page.tsx +++ b/apps/dashboard/src/app/(app)/drops/[slug]/page.tsx @@ -1,3 +1,4 @@ +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { defineDashboardChain } from "lib/defineDashboardChain"; import type { Metadata } from "next"; import { notFound } from "next/navigation"; @@ -12,7 +13,6 @@ import { getActiveClaimCondition as getActiveClaimCondition1155, getNFT as getNFT1155, } from "thirdweb/extensions/erc1155"; -import { serverThirdwebClient } from "../../../../@/constants/thirdweb-client.server"; import { DROP_PAGES } from "./data"; import { NftMint } from "./mint-ui"; diff --git a/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/add-members/page.tsx b/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/add-members/page.tsx index 73beee523c4..15bdf36d4ee 100644 --- a/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/add-members/page.tsx +++ b/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/add-members/page.tsx @@ -1,6 +1,6 @@ import { getTeamBySlug } from "@/api/team"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { notFound } from "next/navigation"; -import { getClientThirdwebClient } from "../../../../../../@/constants/thirdweb-client.client"; import { getAuthToken } from "../../../../api/lib/getAuthToken"; import { TeamOnboardingLayout } from "../../../../login/onboarding/onboarding-layout"; import { InviteTeamMembers } from "../../../../login/onboarding/team-onboarding/team-onboarding"; diff --git a/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/layout.tsx b/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/layout.tsx index 975c707a339..f1570b96004 100644 --- a/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/layout.tsx +++ b/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/layout.tsx @@ -1,8 +1,8 @@ import { getProjects } from "@/api/projects"; import { getTeamBySlug, getTeams } from "@/api/team"; import { AppFooter } from "@/components/blocks/app-footer"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { notFound } from "next/navigation"; -import { getClientThirdwebClient } from "../../../../../@/constants/thirdweb-client.client"; import { getValidAccount } from "../../../account/settings/getAccount"; import { getAuthToken, diff --git a/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/page.tsx b/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/page.tsx index 4e0daa6f130..8522cbfcd33 100644 --- a/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/page.tsx +++ b/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/page.tsx @@ -1,6 +1,6 @@ import { getTeamBySlug } from "@/api/team"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { notFound } from "next/navigation"; -import { getClientThirdwebClient } from "../../../../../@/constants/thirdweb-client.client"; import { getAuthToken } from "../../../api/lib/getAuthToken"; import { loginRedirect } from "../../../login/loginRedirect"; import { TeamOnboardingLayout } from "../../../login/onboarding/onboarding-layout"; diff --git a/apps/dashboard/src/app/(app)/login/onboarding/LinkWalletPrompt/LinkWalletPrompt.tsx b/apps/dashboard/src/app/(app)/login/onboarding/LinkWalletPrompt/LinkWalletPrompt.tsx index 6664b631d17..868043866e8 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/LinkWalletPrompt/LinkWalletPrompt.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/LinkWalletPrompt/LinkWalletPrompt.tsx @@ -4,10 +4,10 @@ import { Spinner } from "@/components/ui/Spinner/Spinner"; import { Button } from "@/components/ui/button"; import { TrackedLinkTW } from "@/components/ui/tracked-link"; import { useMutation } from "@tanstack/react-query"; +import type { TrackingParams } from "hooks/analytics/useTrack"; import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react"; import { toast } from "sonner"; import { shortenString } from "utils/usedapp-external"; -import type { TrackingParams } from "../../../../../hooks/analytics/useTrack"; export function LinkWalletPrompt(props: { email: string; diff --git a/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding.tsx b/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding.tsx index f1b49abe9a4..6eaa4dbcf00 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding.tsx @@ -5,9 +5,9 @@ import { updateAccountClient, verifyEmailClient, } from "@3rdweb-sdk/react/hooks/useApi"; +import { useTrack } from "hooks/analytics/useTrack"; import { useActiveWallet } from "thirdweb/react"; import { useDisconnect } from "thirdweb/react"; -import { useTrack } from "../../../../hooks/analytics/useTrack"; import { doLogout } from "../auth-actions"; import { AccountOnboardingUI } from "./account-onboarding-ui"; diff --git a/apps/dashboard/src/app/(app)/login/page.tsx b/apps/dashboard/src/app/(app)/login/page.tsx index 7af7619e384..b23768ea7d0 100644 --- a/apps/dashboard/src/app/(app)/login/page.tsx +++ b/apps/dashboard/src/app/(app)/login/page.tsx @@ -1,4 +1,4 @@ -import { getClientThirdwebClient } from "../../../@/constants/thirdweb-client.client"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { getRawAccount } from "../account/settings/getAccount"; import { LoginAndOnboardingPage } from "./LoginPage"; import { isValidEncodedRedirectPath } from "./isValidEncodedRedirectPath"; diff --git a/apps/dashboard/src/app/(app)/project-showcase/[slug]/page.tsx b/apps/dashboard/src/app/(app)/project-showcase/[slug]/page.tsx index 56fb26422f1..b8b9f40d20e 100644 --- a/apps/dashboard/src/app/(app)/project-showcase/[slug]/page.tsx +++ b/apps/dashboard/src/app/(app)/project-showcase/[slug]/page.tsx @@ -7,11 +7,11 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; import { PROJECT_SHOWCASE_DATA } from "lib/project-showcase-constants"; import { ExternalLinkIcon, FileTextIcon } from "lucide-react"; import Link from "next/link"; -import { serverThirdwebClient } from "../../../../@/constants/thirdweb-client.server"; export default async function DetailPage(props: { params: Promise<{ slug: string }>; diff --git a/apps/dashboard/src/app/(app)/project-showcase/page.tsx b/apps/dashboard/src/app/(app)/project-showcase/page.tsx index be1d967294e..6a8c0498765 100644 --- a/apps/dashboard/src/app/(app)/project-showcase/page.tsx +++ b/apps/dashboard/src/app/(app)/project-showcase/page.tsx @@ -15,6 +15,7 @@ import { PaginationNext, PaginationPrevious, } from "@/components/ui/pagination"; +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; import { PROJECT_SHOWCASE_DATA, @@ -26,7 +27,6 @@ import { FileTextIcon } from "lucide-react"; import type { Metadata } from "next"; import Image from "next/image"; import Link from "next/link"; -import { serverThirdwebClient } from "../../../@/constants/thirdweb-client.server"; export const metadata: Metadata = { title: "Project Showcase | Built on thirdweb", diff --git a/apps/dashboard/src/app/(app)/providers.tsx b/apps/dashboard/src/app/(app)/providers.tsx index b18ff48d3c7..00879438746 100644 --- a/apps/dashboard/src/app/(app)/providers.tsx +++ b/apps/dashboard/src/app/(app)/providers.tsx @@ -1,5 +1,6 @@ "use client"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { CustomConnectWallet } from "@3rdweb-sdk/react/components/connect-wallet"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { isSanctionedAddress } from "data/eth-sanctioned-addresses"; @@ -14,7 +15,6 @@ import { useActiveAccount, useConnectionManager, } from "thirdweb/react"; -import { getClientThirdwebClient } from "../../@/constants/thirdweb-client.client"; import { TWAutoConnect } from "./components/autoconnect"; const queryClient = new QueryClient(); diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx index 633ee67ebf0..4780484b081 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx @@ -2,10 +2,10 @@ import { getProjects } from "@/api/projects"; import { getTeams } from "@/api/team"; import { AppFooter } from "@/components/blocks/app-footer"; import { TabPathLinks } from "@/components/ui/tabs"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { AnnouncementBanner } from "components/notices/AnnouncementBanner"; import { redirect } from "next/navigation"; import { siwaExamplePrompts } from "../../../(dashboard)/support/page"; -import { getClientThirdwebClient } from "../../../../../@/constants/thirdweb-client.client"; import { CustomChatButton } from "../../../../nebula-app/(app)/components/CustomChat/CustomChatButton"; import { getValidAccount } from "../../../account/settings/getAccount"; import { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/partners/[partner_id]/edit/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/partners/[partner_id]/edit/page.tsx index 68eea091c5e..e848cb8f5c7 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/partners/[partner_id]/edit/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/partners/[partner_id]/edit/page.tsx @@ -1,6 +1,6 @@ import { getTeamBySlug } from "@/api/team"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { notFound } from "next/navigation"; -import { getClientThirdwebClient } from "../../../../../../../../../../../../../@/constants/thirdweb-client.client"; import { getAuthToken } from "../../../../../../../../../../../api/lib/getAuthToken"; import { loginRedirect } from "../../../../../../../../../../../login/loginRedirect"; import { UpdatePartnerForm } from "../../../components/client/update-partner-form.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/page.tsx index 88b4863e71f..81df228a121 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/page.tsx @@ -2,9 +2,9 @@ import { getProjects } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; import { getTeamSubscriptions } from "@/api/team-subscription"; import { fetchRPCUsage } from "@/api/usage/rpc"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { normalizeTimeISOString } from "@/lib/time"; import { redirect } from "next/navigation"; -import { getClientThirdwebClient } from "../../../../../../../@/constants/thirdweb-client.client"; import { getValidAccount } from "../../../../../account/settings/getAccount"; import { getAuthToken } from "../../../../../api/lib/getAuthToken"; import { loginRedirect } from "../../../../../login/loginRedirect"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/page.tsx index 517dfb692eb..592794fc9f5 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/page.tsx @@ -1,8 +1,8 @@ import { getProject } from "@/api/projects"; import { NEXT_PUBLIC_THIRDWEB_VAULT_URL } from "@/constants/public-envs"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { createVaultClient, listEoas } from "@thirdweb-dev/vault-sdk"; import { notFound } from "next/navigation"; -import { getClientThirdwebClient } from "../../../../../../../../../@/constants/thirdweb-client.client"; import { getAuthToken } from "../../../../../../../api/lib/getAuthToken"; import type { Wallet } from "./wallet-table/types"; import { ServerWalletsTable } from "./wallet-table/wallet-table"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/layout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/layout.tsx index 127789ea792..d6a6b78eb8e 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/layout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/layout.tsx @@ -1,10 +1,10 @@ import { getProjects } from "@/api/projects"; import { getTeams } from "@/api/team"; import { SidebarProvider } from "@/components/ui/sidebar"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { AnnouncementBanner } from "components/notices/AnnouncementBanner"; import { redirect } from "next/navigation"; import { siwaExamplePrompts } from "../../../../(dashboard)/support/page"; -import { getClientThirdwebClient } from "../../../../../../@/constants/thirdweb-client.client"; import { CustomChatButton } from "../../../../../nebula-app/(app)/components/CustomChat/CustomChatButton"; import { getValidAccount } from "../../../../account/settings/getAccount"; import { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/page.tsx index d603dd53e70..e1945f06a48 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/page.tsx @@ -23,6 +23,7 @@ import { getWalletUsers, isProjectActive, } from "@/api/analytics"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { EmptyStateCard, EmptyStateContent, @@ -36,7 +37,6 @@ import { getChainMetadata, } from "thirdweb/chains"; import { type WalletId, getWalletInfo } from "thirdweb/wallets"; -import { getClientThirdwebClient } from "../../../../../../@/constants/thirdweb-client.client"; import { getAuthToken } from "../../../../api/lib/getAuthToken"; import { loginRedirect } from "../../../../login/loginRedirect"; import { CombinedBarChartCard } from "../../../components/Analytics/CombinedBarChartCard"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/(marketplace)/direct-listings/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/(marketplace)/direct-listings/page.tsx index 6f0ea247a00..1f8fdf7ae9a 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/(marketplace)/direct-listings/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/(marketplace)/direct-listings/page.tsx @@ -1,6 +1,6 @@ +import { getProject } from "@/api/projects"; import { notFound } from "next/navigation"; import { SharedDirectListingsPage } from "../../../../../../../../(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page"; -import { getProject } from "../../../../../../../../../../@/api/projects"; import type { ProjectContractPageParams } from "../../types"; export default async function Page(props: { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/(marketplace)/english-auctions/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/(marketplace)/english-auctions/page.tsx index c53a1c377f1..7278e32244c 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/(marketplace)/english-auctions/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/(marketplace)/english-auctions/page.tsx @@ -1,6 +1,6 @@ +import { getProject } from "@/api/projects"; import { notFound } from "next/navigation"; import { SharedEnglishAuctionsPage } from "../../../../../../../../(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/english-auctions/shared-english-auctions-page"; -import { getProject } from "../../../../../../../../../../@/api/projects"; import type { ProjectContractPageParams } from "../../types"; export default async function Page(props: { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/account/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/account/page.tsx index 4b7a14eae4a..eca3ef1194a 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/account/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/account/page.tsx @@ -1,6 +1,6 @@ +import { getProject } from "@/api/projects"; import { notFound } from "next/navigation"; import { SharedContractAccountPage } from "../../../../../../../(dashboard)/(chain)/[chain_id]/[contractAddress]/account/shared-account-page"; -import { getProject } from "../../../../../../../../../@/api/projects"; import type { ProjectContractPageParams } from "../types"; export default async function Page(props: { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/settings/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/settings/page.tsx index 68bc5c701f3..aff5902f2e0 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/settings/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/settings/page.tsx @@ -1,6 +1,6 @@ +import { getProject } from "@/api/projects"; import { notFound } from "next/navigation"; import { SharedContractSettingsPage } from "../../../../../../../(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/shared-settings-page"; -import { getProject } from "../../../../../../../../../@/api/projects"; import type { ProjectContractPageParams } from "../types"; export default async function Page(props: { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/split/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/split/page.tsx index b319dd2b2db..4c9fc53dfe1 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/split/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/split/page.tsx @@ -1,6 +1,6 @@ +import { getProject } from "@/api/projects"; import { notFound } from "next/navigation"; import { SharedContractSplitPage } from "../../../../../../../(dashboard)/(chain)/[chain_id]/[contractAddress]/split/shared-split-page"; -import { getProject } from "../../../../../../../../../@/api/projects"; import type { ProjectContractPageParams } from "../types"; export default async function Page(props: { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/tokens/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/tokens/page.tsx index 1cb4ea75d4a..ba7250b7e9f 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/tokens/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/tokens/page.tsx @@ -1,6 +1,6 @@ +import { getProject } from "@/api/projects"; import { notFound } from "next/navigation"; import { SharedContractTokensPage } from "../../../../../../../(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page"; -import { getProject } from "../../../../../../../../../@/api/projects"; import type { ProjectContractPageParams } from "../types"; export default async function Page(props: { diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/AssetsSection/AssetsSection.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/AssetsSection/AssetsSection.tsx index f0bbe25c84f..34850ad15b1 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/AssetsSection/AssetsSection.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/AssetsSection/AssetsSection.tsx @@ -1,6 +1,7 @@ import { Skeleton } from "@/components/ui/skeleton"; import { isProd } from "@/constants/env-utils"; import { useQuery } from "@tanstack/react-query"; +import { useAllChainsData } from "hooks/chains/allChains"; import { XIcon } from "lucide-react"; import Link from "next/link"; import { @@ -19,7 +20,6 @@ import { } from "thirdweb/react"; import { getWalletBalance } from "thirdweb/wallets"; import { ChainIconClient } from "../../../../../components/icons/ChainIcon"; -import { useAllChainsData } from "../../../../../hooks/chains/allChains"; import { nebulaAppThirdwebClient } from "../../utils/nebulaThirdwebClient"; export type AssetBalance = { diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/CustomChat/CustomChatButton.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/CustomChat/CustomChatButton.tsx index 1ca4f4b8563..f15a4e8930b 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/CustomChat/CustomChatButton.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/CustomChat/CustomChatButton.tsx @@ -1,12 +1,12 @@ "use client"; import { Button } from "@/components/ui/button"; +import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; import { cn } from "@/lib/utils"; +import { useTrack } from "hooks/analytics/useTrack"; import { MessageCircleIcon, XIcon } from "lucide-react"; import { useCallback, useRef, useState } from "react"; import { createThirdwebClient } from "thirdweb"; -import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "../../../../../@/constants/public-envs"; -import { useTrack } from "../../../../../hooks/analytics/useTrack"; import CustomChatContent from "./CustomChatContent"; // Create a thirdweb client for the chat functionality diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/Swap/common.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/Swap/common.tsx index 9aa3a95e397..62d59dce2ee 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/Swap/common.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/Swap/common.tsx @@ -2,6 +2,7 @@ import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; +import { useTrack } from "hooks/analytics/useTrack"; import { CircleCheckIcon, CircleXIcon } from "lucide-react"; import { ExternalLinkIcon } from "lucide-react"; import { useTheme } from "next-themes"; @@ -10,7 +11,6 @@ import { useCallback, useState } from "react"; import { type PreparedTransaction, waitForReceipt } from "thirdweb"; import { useSendTransaction } from "thirdweb/react"; import { getSDKTheme } from "../../../../(app)/components/sdk-component-theme"; -import { useTrack } from "../../../../../hooks/analytics/useTrack"; import { useV5DashboardChain } from "../../../../../lib/v5-adapter"; export type TxStatus = diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/TransactionsSection/TransactionsSection.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/TransactionsSection/TransactionsSection.tsx index b67f9a9a126..a32b263f171 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/TransactionsSection/TransactionsSection.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/TransactionsSection/TransactionsSection.tsx @@ -1,13 +1,13 @@ import { Skeleton } from "@/components/ui/skeleton"; import { isProd } from "@/constants/env-utils"; import { useQuery } from "@tanstack/react-query"; +import { useAllChainsData } from "hooks/chains/allChains"; import { XIcon } from "lucide-react"; import Link from "next/link"; import type { ThirdwebClient } from "thirdweb"; import { useActiveAccount, useActiveWalletChain } from "thirdweb/react"; import { shortenAddress } from "thirdweb/utils"; import { ChainIconClient } from "../../../../../components/icons/ChainIcon"; -import { useAllChainsData } from "../../../../../hooks/chains/allChains"; import { nebulaAppThirdwebClient } from "../../utils/nebulaThirdwebClient"; // Note: this is not the full object type returned from insight API, it only includes fields we care about diff --git a/apps/dashboard/src/app/pay/[id]/page.tsx b/apps/dashboard/src/app/pay/[id]/page.tsx index 0d748c11d84..0f86ecd1216 100644 --- a/apps/dashboard/src/app/pay/[id]/page.tsx +++ b/apps/dashboard/src/app/pay/[id]/page.tsx @@ -1,9 +1,9 @@ import { getPaymentLink } from "@/api/universal-bridge/links"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import type { Metadata } from "next"; import { defineChain, getContract } from "thirdweb"; import { getCurrencyMetadata } from "thirdweb/extensions/erc20"; import { checksumAddress } from "thirdweb/utils"; -import { getClientThirdwebClient } from "../../../@/constants/thirdweb-client.client"; import { PayPageEmbed } from "../components/client/PayPageEmbed.client"; const title = "thirdweb Pay"; diff --git a/apps/dashboard/src/components/ClientOnly/ClientOnly.tsx b/apps/dashboard/src/components/ClientOnly/ClientOnly.tsx index f746934a0bf..9804bb57d8d 100644 --- a/apps/dashboard/src/components/ClientOnly/ClientOnly.tsx +++ b/apps/dashboard/src/components/ClientOnly/ClientOnly.tsx @@ -1,8 +1,8 @@ "use client"; +import { cn } from "@/lib/utils"; import { type ReactNode, useEffect, useState } from "react"; import type { ComponentWithChildren } from "types/component-with-children"; -import { cn } from "../../@/lib/utils"; import styles from "./ClientOnly.module.css"; interface ClientOnlyProps { diff --git a/apps/dashboard/src/components/analytics/stat.tsx b/apps/dashboard/src/components/analytics/stat.tsx index be7621a44dc..7d856cd4c9e 100644 --- a/apps/dashboard/src/components/analytics/stat.tsx +++ b/apps/dashboard/src/components/analytics/stat.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "../../@/components/ui/skeleton"; +import { Skeleton } from "@/components/ui/skeleton"; export const StatCard: React.FC<{ label: string; diff --git a/apps/dashboard/src/components/buttons/MismatchButton.tsx b/apps/dashboard/src/components/buttons/MismatchButton.tsx index 813dcb4c672..1d8751ed6ea 100644 --- a/apps/dashboard/src/components/buttons/MismatchButton.tsx +++ b/apps/dashboard/src/components/buttons/MismatchButton.tsx @@ -27,6 +27,7 @@ import type { import { getSDKTheme } from "app/(app)/components/sdk-component-theme"; import { LOCAL_NODE_PKEY } from "constants/misc"; import { useTrack } from "hooks/analytics/useTrack"; +import { useAllChainsData } from "hooks/chains/allChains"; import { ExternalLinkIcon, UnplugIcon } from "lucide-react"; import { useTheme } from "next-themes"; import Link from "next/link"; @@ -52,7 +53,6 @@ import { } from "thirdweb/react"; import { type Wallet, privateKeyToAccount } from "thirdweb/wallets"; import { getFaucetClaimAmount } from "../../app/(app)/api/testnet-faucet/claim/claim-amount"; -import { useAllChainsData } from "../../hooks/chains/allChains"; import { useV5DashboardChain } from "../../lib/v5-adapter"; const GAS_FREE_CHAINS = [ diff --git a/apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx b/apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx index 5dc50e41d90..0f4c2613d38 100644 --- a/apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx +++ b/apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx @@ -6,11 +6,11 @@ import { Label } from "@/components/ui/label"; import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; import { useStore } from "@/lib/reactive"; import { ChainIconClient } from "components/icons/ChainIcon"; +import { useAllChainsData } from "hooks/chains/allChains"; import { getDashboardChainRpc } from "lib/rpc"; import { CircleAlertIcon, Trash2Icon } from "lucide-react"; import { useForm } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; -import { useAllChainsData } from "../../hooks/chains/allChains"; import { type StoredChain, chainOverridesStore, diff --git a/apps/dashboard/src/components/configure-networks/Form/NetworkIdInput.tsx b/apps/dashboard/src/components/configure-networks/Form/NetworkIdInput.tsx index 403945d8e48..df1c7641740 100644 --- a/apps/dashboard/src/components/configure-networks/Form/NetworkIdInput.tsx +++ b/apps/dashboard/src/components/configure-networks/Form/NetworkIdInput.tsx @@ -1,7 +1,7 @@ import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; import { Input } from "@/components/ui/input"; +import { useAllChainsData } from "hooks/chains/allChains"; import type { UseFormReturn } from "react-hook-form"; -import { useAllChainsData } from "../../../hooks/chains/allChains"; import type { NetworkConfigFormData } from "../ConfigureNetworkForm"; export const NetworkIDInput: React.FC<{ diff --git a/apps/dashboard/src/components/contract-components/contract-table/index.tsx b/apps/dashboard/src/components/contract-components/contract-table/index.tsx index 5a8d74a3fad..763a340f039 100644 --- a/apps/dashboard/src/components/contract-components/contract-table/index.tsx +++ b/apps/dashboard/src/components/contract-components/contract-table/index.tsx @@ -7,8 +7,8 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import Link from "next/link"; -import { serverThirdwebClient } from "../../../@/constants/thirdweb-client.server"; import { fetchDeployMetadata } from "../fetchDeployMetadata"; import { ContractIdImage } from "../shared/contract-id-image"; diff --git a/apps/dashboard/src/components/contract-components/published-contract/index.tsx b/apps/dashboard/src/components/contract-components/published-contract/index.tsx index c0166e30c44..3e9f67fb767 100644 --- a/apps/dashboard/src/components/contract-components/published-contract/index.tsx +++ b/apps/dashboard/src/components/contract-components/published-contract/index.tsx @@ -1,5 +1,7 @@ "use client"; +import { Button } from "@/components/ui/button"; +import { Separator } from "@/components/ui/separator"; import { Divider, Flex, GridItem, List, ListItem } from "@chakra-ui/react"; import { useQuery } from "@tanstack/react-query"; import { ContractFunctionsOverview } from "components/contract-functions/contract-functions"; @@ -21,8 +23,6 @@ import { useActiveAccount } from "thirdweb/react"; import { download } from "thirdweb/storage"; import invariant from "tiny-invariant"; import { Card, Heading, LinkButton, Text } from "tw-components"; -import { Button } from "../../../@/components/ui/button"; -import { Separator } from "../../../@/components/ui/separator"; import type { PublishedContractWithVersion } from "../fetch-contracts-with-versions"; import { usePublishedContractEvents, diff --git a/apps/dashboard/src/components/contract-components/shared/contract-id-image.tsx b/apps/dashboard/src/components/contract-components/shared/contract-id-image.tsx index 35a9e918138..cb02cb0801d 100644 --- a/apps/dashboard/src/components/contract-components/shared/contract-id-image.tsx +++ b/apps/dashboard/src/components/contract-components/shared/contract-id-image.tsx @@ -1,10 +1,10 @@ +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; /* eslint-disable @next/next/no-img-element */ import { replaceIpfsUrl } from "lib/sdk"; import type { StaticImageData } from "next/image"; import Image from "next/image"; import type { FetchDeployMetadataResult } from "thirdweb/contract"; import generalContractIcon from "../../../../public/assets/tw-icons/general.png"; -import { serverThirdwebClient } from "../../../@/constants/thirdweb-client.server"; type ContractIdImageProps = { deployedMetadataResult: FetchDeployMetadataResult; diff --git a/apps/dashboard/src/components/contract-components/tables/contract-table.tsx b/apps/dashboard/src/components/contract-components/tables/contract-table.tsx index 5449aa5ac6a..e5fd2f05979 100644 --- a/apps/dashboard/src/components/contract-components/tables/contract-table.tsx +++ b/apps/dashboard/src/components/contract-components/tables/contract-table.tsx @@ -1,5 +1,6 @@ "use client"; +import { PaginationButtons } from "@/components/pagination-buttons"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { Badge } from "@/components/ui/badge"; @@ -19,20 +20,19 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; +import { cn } from "@/lib/utils"; import { useMutation } from "@tanstack/react-query"; import { ChainIconClient } from "components/icons/ChainIcon"; import { NetworkSelectDropdown } from "components/selects/NetworkSelectDropdown"; +import { useAllChainsData } from "hooks/chains/allChains"; import { EllipsisVerticalIcon, ExternalLinkIcon, XIcon } from "lucide-react"; import Link from "next/link"; import { useCallback, useEffect, useMemo, useState } from "react"; import React from "react"; import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; -import { PaginationButtons } from "../../../@/components/pagination-buttons"; -import { cn } from "../../../@/lib/utils"; import type { ProjectContract } from "../../../app/(app)/account/contracts/_components/getProjectContracts"; import { removeContractFromProject } from "../../../app/(app)/team/[team_slug]/[project_slug]/(sidebar)/hooks/project-contracts"; -import { useAllChainsData } from "../../../hooks/chains/allChains"; import { ContractNameCell, ContractTypeCell } from "./cells"; type ContractTableFilters = { diff --git a/apps/dashboard/src/components/icons/ChainIcon.tsx b/apps/dashboard/src/components/icons/ChainIcon.tsx index a19e842480b..a3bf0d8e0fb 100644 --- a/apps/dashboard/src/components/icons/ChainIcon.tsx +++ b/apps/dashboard/src/components/icons/ChainIcon.tsx @@ -1,10 +1,10 @@ "use client"; import { Img } from "@/components/blocks/Img"; +import { cn } from "@/lib/utils"; /* eslint-disable @next/next/no-img-element */ import { replaceIpfsUrl } from "lib/sdk"; import type { ThirdwebClient } from "thirdweb"; -import { cn } from "../../@/lib/utils"; import { fallbackChainIcon } from "../../utils/chain-icons"; type ImageProps = React.ComponentProps<"img">; diff --git a/apps/dashboard/src/components/selects/CustomChainRenderer.tsx b/apps/dashboard/src/components/selects/CustomChainRenderer.tsx index 287219562df..207ff5c8cfd 100644 --- a/apps/dashboard/src/components/selects/CustomChainRenderer.tsx +++ b/apps/dashboard/src/components/selects/CustomChainRenderer.tsx @@ -3,10 +3,10 @@ import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { ChainIconClient } from "components/icons/ChainIcon"; import { OPSponsoredChains } from "constants/chains"; +import { useAllChainsData } from "hooks/chains/allChains"; import { SettingsIcon } from "lucide-react"; import type { ThirdwebClient } from "thirdweb"; import type { UseNetworkSwitcherModalOptions } from "thirdweb/react"; -import { useAllChainsData } from "../../hooks/chains/allChains"; import { type StoredChain, addRecentlyUsedChainId, diff --git a/apps/dashboard/src/components/selects/NetworkSelectDropdown.tsx b/apps/dashboard/src/components/selects/NetworkSelectDropdown.tsx index e520494a5d5..a80f390e519 100644 --- a/apps/dashboard/src/components/selects/NetworkSelectDropdown.tsx +++ b/apps/dashboard/src/components/selects/NetworkSelectDropdown.tsx @@ -6,9 +6,9 @@ import { SelectValue, } from "@/components/ui/select"; import { ChainIconClient } from "components/icons/ChainIcon"; +import { useAllChainsData } from "hooks/chains/allChains"; import { useMemo } from "react"; import type { ThirdwebClient } from "thirdweb"; -import { useAllChainsData } from "../../hooks/chains/allChains"; interface NetworkSelectDropdownProps { enabledChainIds?: number[]; diff --git a/apps/dashboard/src/components/selects/NetworkSelectorButton.tsx b/apps/dashboard/src/components/selects/NetworkSelectorButton.tsx index 6f311afb10d..a741c030219 100644 --- a/apps/dashboard/src/components/selects/NetworkSelectorButton.tsx +++ b/apps/dashboard/src/components/selects/NetworkSelectorButton.tsx @@ -5,6 +5,7 @@ import { useStore } from "@/lib/reactive"; import { cn } from "@/lib/utils"; import { popularChains } from "@3rdweb-sdk/react/components/popularChains"; import { ChainIconClient } from "components/icons/ChainIcon"; +import { useAllChainsData } from "hooks/chains/allChains"; import { useActiveChainAsDashboardChain } from "lib/v5-adapter"; import { ChevronDownIcon } from "lucide-react"; import { useTheme } from "next-themes"; @@ -15,7 +16,6 @@ import { useNetworkSwitcherModal } from "thirdweb/react"; import { useFavoriteChainIds } from "../../app/(app)/(dashboard)/(chain)/components/client/star-button"; import { getSDKTheme } from "../../app/(app)/components/sdk-component-theme"; import { mapV4ChainToV5Chain } from "../../contexts/map-chains"; -import { useAllChainsData } from "../../hooks/chains/allChains"; import { type StoredChain, addRecentlyUsedChainId, diff --git a/apps/dashboard/src/components/shared/CurrencySelector.tsx b/apps/dashboard/src/components/shared/CurrencySelector.tsx index e6be75df4c6..b05193f1202 100644 --- a/apps/dashboard/src/components/shared/CurrencySelector.tsx +++ b/apps/dashboard/src/components/shared/CurrencySelector.tsx @@ -9,9 +9,9 @@ import { } from "@/components/ui/select"; import { cn } from "@/lib/utils"; import { CURRENCIES, type CurrencyMetadata } from "constants/currencies"; +import { useAllChainsData } from "hooks/chains/allChains"; import { useMemo, useState } from "react"; import { NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS, isAddress } from "thirdweb"; -import { useAllChainsData } from "../../hooks/chains/allChains"; interface CurrencySelectorProps { value: string; diff --git a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/TotalSponsoredChartCard.tsx b/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/TotalSponsoredChartCard.tsx index ea966ce0231..dd4d944bc1b 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/TotalSponsoredChartCard.tsx +++ b/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/TotalSponsoredChartCard.tsx @@ -10,9 +10,9 @@ import { UnityIcon } from "components/icons/brand-icons/UnityIcon"; import { UnrealIcon } from "components/icons/brand-icons/UnrealIcon"; import { DocLink } from "components/shared/DocLink"; import { formatDate } from "date-fns"; +import { useAllChainsData } from "hooks/chains/allChains"; import { useMemo } from "react"; import type { UserOpStats } from "types/analytics"; -import { useAllChainsData } from "../../../hooks/chains/allChains"; import { toUSD } from "../../../utils/number"; type ChartData = Record & { diff --git a/apps/dashboard/src/components/smart-wallets/AccountFactories/index.tsx b/apps/dashboard/src/components/smart-wallets/AccountFactories/index.tsx index 62d18148969..b33298e384d 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountFactories/index.tsx +++ b/apps/dashboard/src/components/smart-wallets/AccountFactories/index.tsx @@ -1,6 +1,7 @@ "use client"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; +import { UnderlineLink } from "@/components/ui/UnderlineLink"; import { Table, TableBody, @@ -14,7 +15,6 @@ import { DEFAULT_ACCOUNT_FACTORY_V0_6, DEFAULT_ACCOUNT_FACTORY_V0_7, } from "thirdweb/wallets/smart"; -import { UnderlineLink } from "../../../@/components/ui/UnderlineLink"; export function DefaultFactoriesSection() { const data = [ diff --git a/apps/dashboard/src/components/smart-wallets/SponsorshipPolicies/index.tsx b/apps/dashboard/src/components/smart-wallets/SponsorshipPolicies/index.tsx index 04942e6c23e..f2ded263caf 100644 --- a/apps/dashboard/src/components/smart-wallets/SponsorshipPolicies/index.tsx +++ b/apps/dashboard/src/components/smart-wallets/SponsorshipPolicies/index.tsx @@ -1,5 +1,7 @@ "use client"; +import type { Project } from "@/api/projects"; +import type { Team } from "@/api/team"; import { MultiNetworkSelector } from "@/components/blocks/NetworkSelectors"; import { updateProjectClient } from "@3rdweb-sdk/react/hooks/useApi"; import { @@ -33,8 +35,6 @@ import { import { joinWithComma, toArrFromList } from "utils/string"; import { validStrList } from "utils/validations"; import { z } from "zod"; -import type { Project } from "../../../@/api/projects"; -import type { Team } from "../../../@/api/team"; type AccountAbstractionSettingsPageProps = { bundlerService: ProjectBundlerService; diff --git a/apps/dashboard/src/constants/schemas.ts b/apps/dashboard/src/constants/schemas.ts index f2891821ce1..8d60ae29e62 100644 --- a/apps/dashboard/src/constants/schemas.ts +++ b/apps/dashboard/src/constants/schemas.ts @@ -1,8 +1,8 @@ +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { resolveEns } from "lib/ens"; import { isAddress } from "thirdweb"; import { isValidENSName } from "thirdweb/utils"; import z from "zod"; -import { getClientThirdwebClient } from "../@/constants/thirdweb-client.client"; /** * This file contains some useful zod schemas from the SDK v4 diff --git a/apps/dashboard/src/contract-ui/tabs/code/components/code-overview.tsx b/apps/dashboard/src/contract-ui/tabs/code/components/code-overview.tsx index e984fa99e0c..d80d5be2c90 100644 --- a/apps/dashboard/src/contract-ui/tabs/code/components/code-overview.tsx +++ b/apps/dashboard/src/contract-ui/tabs/code/components/code-overview.tsx @@ -28,6 +28,7 @@ import { } from "abitype"; import { getContractFunctionsFromAbi } from "components/contract-components/getContractFunctionsFromAbi"; import { useContractEvents } from "components/contract-components/hooks"; +import { useAllChainsData } from "hooks/chains/allChains"; import { useSearchParams } from "next/navigation"; import { useMemo, useState } from "react"; import * as ERC20Ext from "thirdweb/extensions/erc20"; @@ -37,7 +38,6 @@ import * as ERC4337Ext from "thirdweb/extensions/erc4337"; import { useActiveAccount } from "thirdweb/react"; import { toFunctionSelector } from "thirdweb/utils"; import { Button, Card, Heading, Link, Text, TrackedLink } from "tw-components"; -import { useAllChainsData } from "../../../../hooks/chains/allChains"; interface CodeOverviewProps { abi?: Abi; diff --git a/apps/dashboard/src/data/analytics/contract-event-breakdown.ts b/apps/dashboard/src/data/analytics/contract-event-breakdown.ts index 3f2dc126832..f38eed0d125 100644 --- a/apps/dashboard/src/data/analytics/contract-event-breakdown.ts +++ b/apps/dashboard/src/data/analytics/contract-event-breakdown.ts @@ -1,5 +1,5 @@ +import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; import { getUnixTime } from "date-fns"; -import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "../../@/constants/public-envs"; import { getVercelEnv } from "../../lib/vercel-utils"; type InsightAggregationEntry = { diff --git a/apps/dashboard/src/data/analytics/contract-events.ts b/apps/dashboard/src/data/analytics/contract-events.ts index a2b3164d40e..c7c458a28ba 100644 --- a/apps/dashboard/src/data/analytics/contract-events.ts +++ b/apps/dashboard/src/data/analytics/contract-events.ts @@ -1,5 +1,5 @@ +import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; import { getUnixTime } from "date-fns"; -import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "../../@/constants/public-envs"; import { getVercelEnv } from "../../lib/vercel-utils"; // This is weird aggregation response type, this will be changed later in insight diff --git a/apps/dashboard/src/data/analytics/contract-function-breakdown.ts b/apps/dashboard/src/data/analytics/contract-function-breakdown.ts index 92a47f22ec9..8c40251a277 100644 --- a/apps/dashboard/src/data/analytics/contract-function-breakdown.ts +++ b/apps/dashboard/src/data/analytics/contract-function-breakdown.ts @@ -1,5 +1,5 @@ +import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; import { getUnixTime } from "date-fns"; -import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "../../@/constants/public-envs"; import { getVercelEnv } from "../../lib/vercel-utils"; type InsightAggregationEntry = { diff --git a/apps/dashboard/src/data/analytics/contract-wallet-analytics.ts b/apps/dashboard/src/data/analytics/contract-wallet-analytics.ts index f85540fce67..32473d758a4 100644 --- a/apps/dashboard/src/data/analytics/contract-wallet-analytics.ts +++ b/apps/dashboard/src/data/analytics/contract-wallet-analytics.ts @@ -1,5 +1,5 @@ +import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; import { getUnixTime } from "date-fns"; -import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "../../@/constants/public-envs"; import { getVercelEnv } from "../../lib/vercel-utils"; // This is weird aggregation response type, this will be changed later in insight diff --git a/apps/dashboard/src/data/analytics/total-contract-transactions.ts b/apps/dashboard/src/data/analytics/total-contract-transactions.ts index 4fda3c35c38..3af244239ea 100644 --- a/apps/dashboard/src/data/analytics/total-contract-transactions.ts +++ b/apps/dashboard/src/data/analytics/total-contract-transactions.ts @@ -1,4 +1,4 @@ -import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "../../@/constants/public-envs"; +import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; import { getVercelEnv } from "../../lib/vercel-utils"; // This is weird aggregation response type, this will be changed later in insight diff --git a/apps/dashboard/src/hooks/tokens/tokens.ts b/apps/dashboard/src/hooks/tokens/tokens.ts index bfdbb381cb6..18da3934d79 100644 --- a/apps/dashboard/src/hooks/tokens/tokens.ts +++ b/apps/dashboard/src/hooks/tokens/tokens.ts @@ -1,5 +1,5 @@ +import { getUniversalBridgeTokens } from "@/api/universal-bridge/tokens"; import { useQuery } from "@tanstack/react-query"; -import { getUniversalBridgeTokens } from "../../@/api/universal-bridge/tokens"; export function useTokensData({ chainId, diff --git a/apps/dashboard/src/lib/defineDashboardChain.ts b/apps/dashboard/src/lib/defineDashboardChain.ts index 27445959111..7e11d48e0ea 100644 --- a/apps/dashboard/src/lib/defineDashboardChain.ts +++ b/apps/dashboard/src/lib/defineDashboardChain.ts @@ -1,6 +1,6 @@ +import { PROD_OR_DEV_URL } from "@/constants/env-utils"; import { defineChain } from "thirdweb"; import type { ChainMetadata } from "thirdweb/chains"; -import { PROD_OR_DEV_URL } from "../@/constants/env-utils"; import { mapV4ChainToV5Chain } from "../contexts/map-chains"; export function defineDashboardChain( diff --git a/apps/dashboard/src/lib/rpc.ts b/apps/dashboard/src/lib/rpc.ts index ff105177a2f..ae400958f7b 100644 --- a/apps/dashboard/src/lib/rpc.ts +++ b/apps/dashboard/src/lib/rpc.ts @@ -1,7 +1,7 @@ +import { isProd } from "@/constants/env-utils"; import { defineDashboardChain } from "lib/defineDashboardChain"; import type { ThirdwebClient } from "thirdweb"; import { type ChainMetadata, getRpcUrlForChain } from "thirdweb/chains"; -import { isProd } from "../@/constants/env-utils"; import { hostnameEndsWith } from "../utils/url"; export function getDashboardChainRpc( diff --git a/apps/dashboard/src/lib/v5-adapter.ts b/apps/dashboard/src/lib/v5-adapter.ts index d66a2be3710..8fe42c5f1c1 100644 --- a/apps/dashboard/src/lib/v5-adapter.ts +++ b/apps/dashboard/src/lib/v5-adapter.ts @@ -1,10 +1,10 @@ "use client"; +import { useAllChainsData } from "hooks/chains/allChains"; import { defineDashboardChain } from "lib/defineDashboardChain"; import { useMemo } from "react"; import type { Chain, ChainMetadata } from "thirdweb/chains"; import { useActiveWalletChain } from "thirdweb/react"; -import { useAllChainsData } from "../hooks/chains/allChains"; export function useV5DashboardChain(chainId: undefined): undefined; export function useV5DashboardChain(chainId: number): Chain; diff --git a/apps/dashboard/src/lib/wallet/nfts/alchemy.ts b/apps/dashboard/src/lib/wallet/nfts/alchemy.ts index b42f0233697..d34fc8ef164 100644 --- a/apps/dashboard/src/lib/wallet/nfts/alchemy.ts +++ b/apps/dashboard/src/lib/wallet/nfts/alchemy.ts @@ -1,8 +1,8 @@ import "server-only"; +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { download } from "thirdweb/storage"; import type { NFTMetadata } from "thirdweb/utils"; -import { serverThirdwebClient } from "../../../@/constants/thirdweb-client.server"; import { handleArbitraryTokenURI, shouldDownloadURI } from "./tokenUri"; import { type AlchemySupportedChainId, diff --git a/apps/dashboard/src/lib/wallet/nfts/moralis.ts b/apps/dashboard/src/lib/wallet/nfts/moralis.ts index efa3ba9789a..3014edc2837 100644 --- a/apps/dashboard/src/lib/wallet/nfts/moralis.ts +++ b/apps/dashboard/src/lib/wallet/nfts/moralis.ts @@ -1,7 +1,7 @@ import "server-only"; +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { download } from "thirdweb/storage"; -import { serverThirdwebClient } from "../../../@/constants/thirdweb-client.server"; import { handleArbitraryTokenURI, shouldDownloadURI } from "./tokenUri"; import type { GenerateURLParams, WalletNFT } from "./types"; diff --git a/apps/dashboard/src/stories/utils.tsx b/apps/dashboard/src/stories/utils.tsx index 78638acdc4d..3c836713cbb 100644 --- a/apps/dashboard/src/stories/utils.tsx +++ b/apps/dashboard/src/stories/utils.tsx @@ -1,6 +1,6 @@ import { Badge } from "@/components/ui/badge"; +import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport"; -import { getClientThirdwebClient } from "../@/constants/thirdweb-client.client"; function StoryBadge(props: { label: string; diff --git a/apps/dashboard/src/utils/pricing.tsx b/apps/dashboard/src/utils/pricing.tsx index 1b84718a829..abc668245e6 100644 --- a/apps/dashboard/src/utils/pricing.tsx +++ b/apps/dashboard/src/utils/pricing.tsx @@ -1,4 +1,4 @@ -import type { Team } from "../@/api/team"; +import type { Team } from "@/api/team"; type SelectivePlans = Exclude< Team["billingPlan"],