diff --git a/apps/dashboard/.eslintrc.js b/apps/dashboard/.eslintrc.js index 3b380fde313..635677853c1 100644 --- a/apps/dashboard/.eslintrc.js +++ b/apps/dashboard/.eslintrc.js @@ -10,9 +10,9 @@ module.exports = { "plugin:storybook/recommended", ], overrides: [ - // disable restricted imports in tw-components + // disable restricted imports in chakra { - files: "src/tw-components/**/*", + files: "src/chakra/**/*", rules: { "no-restricted-imports": ["off"], }, @@ -92,7 +92,7 @@ module.exports = { { paths: [ { - // these are provided by tw-components, so we don't want to import them from chakra directly + // these are provided by chakra folder, so we don't want to import them from chakra directly importNames: [ "Card", "Button", @@ -127,7 +127,7 @@ module.exports = { "StackProps", ], message: - 'Use the equivalent component from "tw-components" instead.', + 'import component from "chakra" folder instead if you have to use chakra component, But use shadcn component otherwise', name: "@chakra-ui/react", }, { @@ -151,12 +151,6 @@ module.exports = { 'Use `import { useDashboardRouter } from "@/lib/DashboardRouter";` instead', name: "next/navigation", }, - { - importNames: ["Link", "Table", "Sidebar"], - message: - 'This is likely a mistake. If you really want to import this - postfix the imported name with Icon. Example - "LinkIcon"', - name: "lucide-react", - }, { message: 'Import "posthog-js" directly only within the analytics helpers ("src/@/analytics/*"). Use the exported helpers from "@/analytics/track" elsewhere.', diff --git a/apps/dashboard/knip.json b/apps/dashboard/knip.json index a063b5a4a8f..022ab47085e 100644 --- a/apps/dashboard/knip.json +++ b/apps/dashboard/knip.json @@ -2,9 +2,9 @@ "$schema": "https://unpkg.com/knip@5/schema.json", "ignore": [ "src/@/components/ui/**", - "src/components/notices/AnnouncementBanner.tsx", - "src/components/cmd-k-search/index.tsx", - "src/lib/search.ts" + "src/@/components/misc/AnnouncementBanner.tsx", + "src/@/components/cmd-k-search/index.tsx", + "src/@/lib/search.ts" ], "ignoreBinaries": ["only-allow"], "ignoreDependencies": [ diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 512f2bd5386..9ebfa0dfcbf 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -128,7 +128,7 @@ "dev": "next dev --turbopack", "fix": "biome check ./src --fix && eslint ./src --fix", "format": "biome format ./src --write", - "gen:theme-typings": "chakra-cli tokens src/theme/index.ts", + "gen:theme-typings": "chakra-cli tokens src/chakra/theme/index.ts", "knip": "knip", "lint": "biome check ./src && knip && eslint ./src", "playwright": "playwright test", diff --git a/apps/dashboard/src/@/actions/acceptInvite.ts b/apps/dashboard/src/@/actions/acceptInvite.ts index ee71e244632..8621caee41c 100644 --- a/apps/dashboard/src/@/actions/acceptInvite.ts +++ b/apps/dashboard/src/@/actions/acceptInvite.ts @@ -1,7 +1,7 @@ "use server"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { getAuthToken } from "@/api/auth-token"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; export async function acceptInvite(options: { teamId: string; diff --git a/apps/dashboard/src/@/actions/billing.ts b/apps/dashboard/src/@/actions/billing.ts index 51b9ab3d897..7860f429e7d 100644 --- a/apps/dashboard/src/@/actions/billing.ts +++ b/apps/dashboard/src/@/actions/billing.ts @@ -1,7 +1,7 @@ "use server"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { getAuthToken } from "@/api/auth-token"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; export async function reSubscribePlan(options: { teamId: string; diff --git a/apps/dashboard/src/@/actions/confirmEmail.ts b/apps/dashboard/src/@/actions/confirmEmail.ts index db55c639d3e..f978cffda05 100644 --- a/apps/dashboard/src/@/actions/confirmEmail.ts +++ b/apps/dashboard/src/@/actions/confirmEmail.ts @@ -1,7 +1,7 @@ "use server"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { getAuthToken } from "@/api/auth-token"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; export async function confirmEmailWithOTP(otp: string) { const token = await getAuthToken(); diff --git a/apps/dashboard/src/@/actions/createTeam.ts b/apps/dashboard/src/@/actions/createTeam.ts index 417e702a141..ed4490ce2b8 100644 --- a/apps/dashboard/src/@/actions/createTeam.ts +++ b/apps/dashboard/src/@/actions/createTeam.ts @@ -4,9 +4,9 @@ import "server-only"; // biome-ignore lint/style/useNodejsImportProtocol: breaks storybook if it's `node:` prefixed import { randomBytes } from "crypto"; import { format } from "date-fns"; +import { getAuthToken } from "@/api/auth-token"; import type { Team } from "@/api/team"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; export async function createTeam(options?: { name?: string; slug?: string }) { const token = await getAuthToken(); diff --git a/apps/dashboard/src/@/actions/deleteTeam.ts b/apps/dashboard/src/@/actions/deleteTeam.ts index faf286883fa..628a343fe6b 100644 --- a/apps/dashboard/src/@/actions/deleteTeam.ts +++ b/apps/dashboard/src/@/actions/deleteTeam.ts @@ -1,7 +1,7 @@ "use server"; import "server-only"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { getAuthToken } from "@/api/auth-token"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; export async function deleteTeam(options: { teamId: string }) { const token = await getAuthToken(); diff --git a/apps/dashboard/src/@/actions/getBalancesFromMoralis.ts b/apps/dashboard/src/@/actions/getBalancesFromMoralis.ts index ed34bbdd4d6..56414cb8d08 100644 --- a/apps/dashboard/src/@/actions/getBalancesFromMoralis.ts +++ b/apps/dashboard/src/@/actions/getBalancesFromMoralis.ts @@ -1,9 +1,9 @@ "use server"; -import { defineDashboardChain } from "lib/defineDashboardChain"; import { isAddress, toTokens, ZERO_ADDRESS } from "thirdweb"; import { getWalletBalance } from "thirdweb/wallets"; -import { MORALIS_API_KEY } from "../constants/server-envs"; -import { serverThirdwebClient } from "../constants/thirdweb-client.server"; +import { MORALIS_API_KEY } from "@/constants/server-envs"; +import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; +import { defineDashboardChain } from "@/lib/defineDashboardChain"; type BalanceQueryResponse = Array<{ balance: string; diff --git a/apps/dashboard/src/@/actions/getWalletNFTs.ts b/apps/dashboard/src/@/actions/getWalletNFTs.ts index c30ae6b7432..0195752c1dd 100644 --- a/apps/dashboard/src/@/actions/getWalletNFTs.ts +++ b/apps/dashboard/src/@/actions/getWalletNFTs.ts @@ -1,19 +1,19 @@ "use server"; +import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; +import { MORALIS_API_KEY } from "@/constants/server-envs"; import { generateAlchemyUrl, transformAlchemyResponseToNFT, -} from "lib/wallet/nfts/alchemy"; +} from "@/lib/wallet/nfts/alchemy"; import { generateMoralisUrl, transformMoralisResponseToNFT, -} from "lib/wallet/nfts/moralis"; -import type { WalletNFT } from "lib/wallet/nfts/types"; -import { getVercelEnv } from "../../lib/vercel-utils"; -import { isAlchemySupported } from "../../lib/wallet/nfts/isAlchemySupported"; -import { isMoralisSupported } from "../../lib/wallet/nfts/isMoralisSupported"; -import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "../constants/public-envs"; -import { MORALIS_API_KEY } from "../constants/server-envs"; +} from "@/lib/wallet/nfts/moralis"; +import type { WalletNFT } from "@/lib/wallet/nfts/types"; +import { getVercelEnv } from "@/utils/vercel"; +import { isAlchemySupported } from "../lib/wallet/nfts/isAlchemySupported"; +import { isMoralisSupported } from "../lib/wallet/nfts/isMoralisSupported"; type WalletNFTApiReturn = | { result: WalletNFT[]; error?: undefined } diff --git a/apps/dashboard/src/@/actions/proxies.ts b/apps/dashboard/src/@/actions/proxies.ts index 83facc34d96..0e1dd79dfb3 100644 --- a/apps/dashboard/src/@/actions/proxies.ts +++ b/apps/dashboard/src/@/actions/proxies.ts @@ -1,11 +1,11 @@ "use server"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; +import { getAuthToken } from "@/api/auth-token"; import { NEXT_PUBLIC_ENGINE_CLOUD_URL, NEXT_PUBLIC_THIRDWEB_API_HOST, -} from "../constants/public-envs"; -import { ANALYTICS_SERVICE_URL } from "../constants/server-envs"; +} from "@/constants/public-envs"; +import { ANALYTICS_SERVICE_URL } from "@/constants/server-envs"; type ProxyActionParams = { pathname: string; diff --git a/apps/dashboard/src/@/actions/sendTeamInvite.ts b/apps/dashboard/src/@/actions/sendTeamInvite.ts index a4e22d69fac..b9842587c49 100644 --- a/apps/dashboard/src/@/actions/sendTeamInvite.ts +++ b/apps/dashboard/src/@/actions/sendTeamInvite.ts @@ -1,7 +1,7 @@ "use server"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { getAuthToken } from "@/api/auth-token"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; export async function sendTeamInvites(options: { teamId: string; diff --git a/apps/dashboard/src/@/actions/stripe-actions.ts b/apps/dashboard/src/@/actions/stripe-actions.ts index 4d9c3aeae6d..0aab0cb7fb6 100644 --- a/apps/dashboard/src/@/actions/stripe-actions.ts +++ b/apps/dashboard/src/@/actions/stripe-actions.ts @@ -1,8 +1,8 @@ import "server-only"; import Stripe from "stripe"; -import type { Team } from "../api/team"; -import { STRIPE_SECRET_KEY } from "../constants/server-envs"; +import type { Team } from "@/api/team"; +import { STRIPE_SECRET_KEY } from "@/constants/server-envs"; let existingStripe: Stripe | undefined; diff --git a/apps/dashboard/src/@/actions/updateAccount.ts b/apps/dashboard/src/@/actions/updateAccount.ts index d37c7034f07..39131f024a0 100644 --- a/apps/dashboard/src/@/actions/updateAccount.ts +++ b/apps/dashboard/src/@/actions/updateAccount.ts @@ -1,6 +1,6 @@ "use server"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { getAuthToken } from "@/api/auth-token"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; export async function updateAccount(values: { name?: string; diff --git a/apps/dashboard/src/@/analytics/report.ts b/apps/dashboard/src/@/analytics/report.ts index 88d9613318a..022cc5fcaac 100644 --- a/apps/dashboard/src/@/analytics/report.ts +++ b/apps/dashboard/src/@/analytics/report.ts @@ -1,6 +1,6 @@ import posthog from "posthog-js"; -import type { Team } from "../api/team"; +import type { Team } from "@/api/team"; // ---------------------------- // CONTRACTS diff --git a/apps/dashboard/src/@/api/analytics.ts b/apps/dashboard/src/@/api/analytics.ts index 230fe35a659..a6f2819e1c6 100644 --- a/apps/dashboard/src/@/api/analytics.ts +++ b/apps/dashboard/src/@/api/analytics.ts @@ -1,5 +1,6 @@ import "server-only"; +import { ANALYTICS_SERVICE_URL } from "@/constants/server-envs"; import type { AnalyticsQueryParams, EcosystemWalletStats, @@ -12,9 +13,8 @@ import type { UserOpStats, WalletStats, WalletUserStats, -} from "types/analytics"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { ANALYTICS_SERVICE_URL } from "../constants/server-envs"; +} from "@/types/analytics"; +import { getAuthToken } from "./auth-token"; import { getChains } from "./chain"; async function fetchAnalytics( diff --git a/apps/dashboard/src/@/api/audit-log.ts b/apps/dashboard/src/@/api/audit-log.ts index 5e48374303c..c04c8ba5460 100644 --- a/apps/dashboard/src/@/api/audit-log.ts +++ b/apps/dashboard/src/@/api/audit-log.ts @@ -1,8 +1,8 @@ "use server"; import "server-only"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; +import { getAuthToken } from "./auth-token"; export type AuditLogEntry = { who: { diff --git a/apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts b/apps/dashboard/src/@/api/auth-token.ts similarity index 95% rename from apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts rename to apps/dashboard/src/@/api/auth-token.ts index cd5b41a4830..0f062fd39ca 100644 --- a/apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts +++ b/apps/dashboard/src/@/api/auth-token.ts @@ -1,6 +1,6 @@ -import { LAST_USED_TEAM_ID } from "constants/cookies"; import { cookies } from "next/headers"; import { COOKIE_ACTIVE_ACCOUNT, COOKIE_PREFIX_TOKEN } from "@/constants/cookie"; +import { LAST_USED_TEAM_ID } from "@/constants/cookies"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; export async function getAuthToken() { diff --git a/apps/dashboard/src/@/api/chain.ts b/apps/dashboard/src/@/api/chain.ts index 162d8ae5d6a..e231c0dc59e 100644 --- a/apps/dashboard/src/@/api/chain.ts +++ b/apps/dashboard/src/@/api/chain.ts @@ -1,8 +1,8 @@ import "server-only"; import type { ChainMetadata } from "thirdweb/chains"; -import type { ChainService } from "../../app/(app)/(dashboard)/(chain)/types/chain"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; -import { API_SERVER_SECRET } from "../constants/server-envs"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; +import { API_SERVER_SECRET } from "@/constants/server-envs"; +import type { ChainService } from "@/types/chain"; export async function getGasSponsoredChains() { if (!API_SERVER_SECRET) { diff --git a/apps/dashboard/src/@/api/dedicated-support.ts b/apps/dashboard/src/@/api/dedicated-support.ts index 748ce43b406..5ab66abee4f 100644 --- a/apps/dashboard/src/@/api/dedicated-support.ts +++ b/apps/dashboard/src/@/api/dedicated-support.ts @@ -1,8 +1,8 @@ "use server"; import "server-only"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; +import { getAuthToken } from "./auth-token"; export async function createDedicatedSupportChannel( teamIdOrSlug: string, diff --git a/apps/dashboard/src/app/(app)/account/contracts/_components/getProjectContracts.ts b/apps/dashboard/src/@/api/getProjectContracts.ts similarity index 100% rename from apps/dashboard/src/app/(app)/account/contracts/_components/getProjectContracts.ts rename to apps/dashboard/src/@/api/getProjectContracts.ts diff --git a/apps/dashboard/src/@/api/insight/webhooks.ts b/apps/dashboard/src/@/api/insight/webhooks.ts index d992dc1a9b8..f5101c258b1 100644 --- a/apps/dashboard/src/@/api/insight/webhooks.ts +++ b/apps/dashboard/src/@/api/insight/webhooks.ts @@ -1,8 +1,8 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ "use server"; -import { getAuthToken } from "app/(app)/api/lib/getAuthToken"; -import { THIRDWEB_INSIGHT_API_DOMAIN } from "constants/urls"; +import { getAuthToken } from "@/api/auth-token"; +import { THIRDWEB_INSIGHT_API_DOMAIN } from "@/constants/urls"; export interface WebhookResponse { id: string; diff --git a/apps/dashboard/src/@/api/linked-wallets.ts b/apps/dashboard/src/@/api/linked-wallets.ts index f2c8a540956..4d584b29e62 100644 --- a/apps/dashboard/src/@/api/linked-wallets.ts +++ b/apps/dashboard/src/@/api/linked-wallets.ts @@ -1,5 +1,5 @@ -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; +import { getAuthToken } from "./auth-token"; export type LinkedWallet = { createdAt: string; diff --git a/apps/dashboard/src/@/api/notifications.ts b/apps/dashboard/src/@/api/notifications.ts index a230add0dc9..f4db133dd09 100644 --- a/apps/dashboard/src/@/api/notifications.ts +++ b/apps/dashboard/src/@/api/notifications.ts @@ -1,8 +1,8 @@ "use server"; import "server-only"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; +import { getAuthToken } from "./auth-token"; export type Notification = { id: string; diff --git a/apps/dashboard/src/@/api/projects.ts b/apps/dashboard/src/@/api/projects.ts index 6366f9a0e2d..ba5b417b8d1 100644 --- a/apps/dashboard/src/@/api/projects.ts +++ b/apps/dashboard/src/@/api/projects.ts @@ -1,7 +1,7 @@ import "server-only"; import type { ProjectResponse } from "@thirdweb-dev/service-utils"; import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; +import { getAuthToken } from "./auth-token"; export type Project = ProjectResponse; diff --git a/apps/dashboard/src/@/api/sms.ts b/apps/dashboard/src/@/api/sms.ts index 188e6a7fe64..0f261b952f6 100644 --- a/apps/dashboard/src/@/api/sms.ts +++ b/apps/dashboard/src/@/api/sms.ts @@ -1,6 +1,6 @@ import "server-only"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; -import { API_SERVER_SECRET } from "../constants/server-envs"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; +import { API_SERVER_SECRET } from "@/constants/server-envs"; export type SMSCountryTiers = { tier1: string[]; diff --git a/apps/dashboard/src/@/api/team-invites.ts b/apps/dashboard/src/@/api/team-invites.ts index 9799ca22605..5e883881cda 100644 --- a/apps/dashboard/src/@/api/team-invites.ts +++ b/apps/dashboard/src/@/api/team-invites.ts @@ -1,5 +1,5 @@ -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; +import { getAuthToken } from "./auth-token"; export type TeamInvite = { id: string; diff --git a/apps/dashboard/src/@/api/team-members.ts b/apps/dashboard/src/@/api/team-members.ts index 01605d2a003..01a9b8d561e 100644 --- a/apps/dashboard/src/@/api/team-members.ts +++ b/apps/dashboard/src/@/api/team-members.ts @@ -1,6 +1,6 @@ import "server-only"; import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; +import { getAuthToken } from "./auth-token"; const TeamAccountRole = { MEMBER: "MEMBER", diff --git a/apps/dashboard/src/@/api/team-subscription.ts b/apps/dashboard/src/@/api/team-subscription.ts index 03e1b6c0b19..05858f9acef 100644 --- a/apps/dashboard/src/@/api/team-subscription.ts +++ b/apps/dashboard/src/@/api/team-subscription.ts @@ -1,6 +1,6 @@ -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; -import type { ProductSKU } from "../lib/billing"; +import { getAuthToken } from "@/api/auth-token"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; +import type { ProductSKU } from "@/types/billing"; type InvoiceLine = { // amount for this line item diff --git a/apps/dashboard/src/@/api/team.ts b/apps/dashboard/src/@/api/team.ts index 271c723f25a..f8eeb3f43da 100644 --- a/apps/dashboard/src/@/api/team.ts +++ b/apps/dashboard/src/@/api/team.ts @@ -1,11 +1,11 @@ import "server-only"; import type { TeamResponse } from "@thirdweb-dev/service-utils"; import { cookies } from "next/headers"; +import { LAST_USED_TEAM_ID } from "@/constants/cookies"; import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; import { API_SERVER_SECRET } from "@/constants/server-envs"; import { getValidAccount } from "../../app/(app)/account/settings/getAccount"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { LAST_USED_TEAM_ID } from "../../constants/cookies"; +import { getAuthToken } from "./auth-token"; import { getMemberByAccountId } from "./team-members"; export type Team = TeamResponse & { stripeCustomerId: string | null }; diff --git a/apps/dashboard/src/@/api/universal-bridge/developer.ts b/apps/dashboard/src/@/api/universal-bridge/developer.ts index c80467b1a0e..85b2c502017 100644 --- a/apps/dashboard/src/@/api/universal-bridge/developer.ts +++ b/apps/dashboard/src/@/api/universal-bridge/developer.ts @@ -1,6 +1,6 @@ "use server"; -import { getAuthToken } from "app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_BRIDGE_HOST } from "../../constants/public-envs"; +import { getAuthToken } from "@/api/auth-token"; +import { NEXT_PUBLIC_THIRDWEB_BRIDGE_HOST } from "@/constants/public-envs"; const UB_BASE_URL = NEXT_PUBLIC_THIRDWEB_BRIDGE_HOST; diff --git a/apps/dashboard/src/@/api/universal-bridge/tokens.ts b/apps/dashboard/src/@/api/universal-bridge/tokens.ts index 2dc46823d64..60f32c785d8 100644 --- a/apps/dashboard/src/@/api/universal-bridge/tokens.ts +++ b/apps/dashboard/src/@/api/universal-bridge/tokens.ts @@ -1,6 +1,6 @@ "use server"; import type { ProjectResponse } from "@thirdweb-dev/service-utils"; -import { getAuthToken } from "app/(app)/api/lib/getAuthToken"; +import { getAuthToken } from "@/api/auth-token"; import { DASHBOARD_THIRDWEB_SECRET_KEY } from "@/constants/server-envs"; import { UB_BASE_URL } from "./constants"; diff --git a/apps/dashboard/src/@/api/usage/billing-preview.ts b/apps/dashboard/src/@/api/usage/billing-preview.ts index bc4cf815c61..755d10d0542 100644 --- a/apps/dashboard/src/@/api/usage/billing-preview.ts +++ b/apps/dashboard/src/@/api/usage/billing-preview.ts @@ -1,7 +1,7 @@ import "server-only"; +import { getAuthToken } from "@/api/auth-token"; import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; -import { getAuthToken } from "../../../app/(app)/api/lib/getAuthToken"; type LineItem = { quantity: number; diff --git a/apps/dashboard/src/@/api/usage/rpc.ts b/apps/dashboard/src/@/api/usage/rpc.ts index 37a39d24504..915ab5096c6 100644 --- a/apps/dashboard/src/@/api/usage/rpc.ts +++ b/apps/dashboard/src/@/api/usage/rpc.ts @@ -1,6 +1,6 @@ import "server-only"; import { unstable_cache } from "next/cache"; -import { ANALYTICS_SERVICE_URL } from "../../constants/server-envs"; +import { ANALYTICS_SERVICE_URL } from "@/constants/server-envs"; type Last24HoursRPCUsageApiResponse = { peakRate: { diff --git a/apps/dashboard/src/@/api/verified-domain.ts b/apps/dashboard/src/@/api/verified-domain.ts index 5fc17fa39bd..96f03dad84e 100644 --- a/apps/dashboard/src/@/api/verified-domain.ts +++ b/apps/dashboard/src/@/api/verified-domain.ts @@ -1,8 +1,8 @@ "use server"; import "server-only"; -import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; +import { getAuthToken } from "./auth-token"; export type VerifiedDomainResponse = | { diff --git a/apps/dashboard/src/components/analytics/date-range-selector.tsx b/apps/dashboard/src/@/components/analytics/date-range-selector.tsx similarity index 100% rename from apps/dashboard/src/components/analytics/date-range-selector.tsx rename to apps/dashboard/src/@/components/analytics/date-range-selector.tsx diff --git a/apps/dashboard/src/components/analytics/empty-chart-state.tsx b/apps/dashboard/src/@/components/analytics/empty-chart-state.tsx similarity index 100% rename from apps/dashboard/src/components/analytics/empty-chart-state.tsx rename to apps/dashboard/src/@/components/analytics/empty-chart-state.tsx diff --git a/apps/dashboard/src/components/analytics/interval-selector.tsx b/apps/dashboard/src/@/components/analytics/interval-selector.tsx similarity index 100% rename from apps/dashboard/src/components/analytics/interval-selector.tsx rename to apps/dashboard/src/@/components/analytics/interval-selector.tsx diff --git a/apps/dashboard/src/components/analytics/range-selector.tsx b/apps/dashboard/src/@/components/analytics/range-selector.tsx similarity index 94% rename from apps/dashboard/src/components/analytics/range-selector.tsx rename to apps/dashboard/src/@/components/analytics/range-selector.tsx index b4d240c6f40..b3a42292929 100644 --- a/apps/dashboard/src/components/analytics/range-selector.tsx +++ b/apps/dashboard/src/@/components/analytics/range-selector.tsx @@ -1,16 +1,16 @@ "use client"; import { useQuery } from "@tanstack/react-query"; +import { usePathname, useSearchParams } from "next/navigation"; +import { useState } from "react"; import type { DurationId, Range, -} from "components/analytics/date-range-selector"; +} from "@/components/analytics/date-range-selector"; import { DateRangeSelector, getLastNDaysRange, -} from "components/analytics/date-range-selector"; -import { IntervalSelector } from "components/analytics/interval-selector"; -import { usePathname, useSearchParams } from "next/navigation"; -import { useState } from "react"; +} from "@/components/analytics/date-range-selector"; +import { IntervalSelector } from "@/components/analytics/interval-selector"; import { useDashboardRouter } from "@/lib/DashboardRouter"; export function RangeSelector({ diff --git a/apps/dashboard/src/components/analytics/stat.tsx b/apps/dashboard/src/@/components/analytics/stat.tsx similarity index 100% rename from apps/dashboard/src/components/analytics/stat.tsx rename to apps/dashboard/src/@/components/analytics/stat.tsx diff --git a/apps/dashboard/src/components/badges/opensea.tsx b/apps/dashboard/src/@/components/badges/opensea.tsx similarity index 100% rename from apps/dashboard/src/components/badges/opensea.tsx rename to apps/dashboard/src/@/components/badges/opensea.tsx diff --git a/apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx b/apps/dashboard/src/@/components/batch-upload/batch-lazy-mint.tsx similarity index 97% rename from apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx rename to apps/dashboard/src/@/components/batch-upload/batch-lazy-mint.tsx index 83e341bb63b..73a6d1aad41 100644 --- a/apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx +++ b/apps/dashboard/src/@/components/batch-upload/batch-lazy-mint.tsx @@ -11,8 +11,10 @@ import { Textarea, } from "@chakra-ui/react"; import { zodResolver } from "@hookform/resolvers/zod"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { FileInput } from "components/shared/FileInput"; +import { Button } from "chakra/button"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { ChevronLeftIcon, EyeIcon, EyeOffIcon } from "lucide-react"; import { useRef, useState } from "react"; import { useDropzone } from "react-dropzone"; @@ -20,19 +22,13 @@ import { useForm } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; import type { CreateDelayedRevealBatchParams } from "thirdweb/extensions/erc721"; import type { NFTInput } from "thirdweb/utils"; -import { - Button, - FormErrorMessage, - FormHelperText, - FormLabel, - Heading, - Text, -} from "tw-components"; -import type { ComponentWithChildren } from "types/component-with-children"; -import { processInputData, shuffleData } from "utils/batch"; import { z } from "zod"; +import { FileInput } from "@/components/blocks/FileInput"; +import { TransactionButton } from "@/components/tx-button"; import { Checkbox, CheckboxWithLabel } from "@/components/ui/checkbox"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; +import type { ComponentWithChildren } from "@/types/component-with-children"; +import { processInputData, shuffleData } from "@/utils/batch"; import { BatchTable } from "./batch-table"; import { SelectOption } from "./lazy-mint-form/select-option"; import { UploadStep } from "./upload-step"; diff --git a/apps/dashboard/src/core-ui/batch-upload/batch-table.tsx b/apps/dashboard/src/@/components/batch-upload/batch-table.tsx similarity index 100% rename from apps/dashboard/src/core-ui/batch-upload/batch-table.tsx rename to apps/dashboard/src/@/components/batch-upload/batch-table.tsx diff --git a/apps/dashboard/src/core-ui/batch-upload/lazy-mint-form/select-option.tsx b/apps/dashboard/src/@/components/batch-upload/lazy-mint-form/select-option.tsx similarity index 100% rename from apps/dashboard/src/core-ui/batch-upload/lazy-mint-form/select-option.tsx rename to apps/dashboard/src/@/components/batch-upload/lazy-mint-form/select-option.tsx diff --git a/apps/dashboard/src/core-ui/batch-upload/upload-step.tsx b/apps/dashboard/src/@/components/batch-upload/upload-step.tsx similarity index 100% rename from apps/dashboard/src/core-ui/batch-upload/upload-step.tsx rename to apps/dashboard/src/@/components/batch-upload/upload-step.tsx diff --git a/apps/dashboard/src/components/settings/Account/Billing/CancelPlanModal/CancelPlanModal.tsx b/apps/dashboard/src/@/components/billing/CancelPlanModal/CancelPlanModal.tsx similarity index 91% rename from apps/dashboard/src/components/settings/Account/Billing/CancelPlanModal/CancelPlanModal.tsx rename to apps/dashboard/src/@/components/billing/CancelPlanModal/CancelPlanModal.tsx index c7ec68a0096..b74dbcae1bc 100644 --- a/apps/dashboard/src/components/settings/Account/Billing/CancelPlanModal/CancelPlanModal.tsx +++ b/apps/dashboard/src/@/components/billing/CancelPlanModal/CancelPlanModal.tsx @@ -13,12 +13,12 @@ import { SheetTitle, SheetTrigger, } from "@/components/ui/sheet"; +import { PRO_CONTACT_US_URL } from "@/constants/pro"; +import { useStripeRedirectEvent } from "@/hooks/stripe/redirect-event"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { useStripeRedirectEvent } from "../../../../../app/(app)/(stripe)/stripe-redirect/stripeRedirectChannel"; -import { buildCancelPlanUrl } from "../../../../../app/(app)/(stripe)/utils/build-url"; -import { PRO_CONTACT_US_URL } from "../../../../../constants/pro"; -import { pollWithTimeout } from "../../../../../utils/pollWithTimeout"; -import { tryCatch } from "../../../../../utils/try-catch"; +import { pollWithTimeout } from "@/utils/pollWithTimeout"; +import { buildCancelPlanUrl } from "@/utils/stripe/build-url"; +import { tryCatch } from "@/utils/try-catch"; export function CancelPlanButton(props: { teamId: string; diff --git a/apps/dashboard/src/components/settings/Account/Billing/CreditsItem.tsx b/apps/dashboard/src/@/components/billing/CreditsItem.tsx similarity index 92% rename from apps/dashboard/src/components/settings/Account/Billing/CreditsItem.tsx rename to apps/dashboard/src/@/components/billing/CreditsItem.tsx index 544d527d219..6d7f46e42b1 100644 --- a/apps/dashboard/src/components/settings/Account/Billing/CreditsItem.tsx +++ b/apps/dashboard/src/@/components/billing/CreditsItem.tsx @@ -1,13 +1,13 @@ -import type { Account, BillingCredit } from "@3rdweb-sdk/react/hooks/useApi"; -import { ChainIconClient } from "components/icons/ChainIcon"; import { formatDistance } from "date-fns"; -import { useLocalStorage } from "hooks/useLocalStorage"; import { CircleAlertIcon } from "lucide-react"; import Image from "next/image"; import Link from "next/link"; import type { ThirdwebClient } from "thirdweb"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; +import type { Account, BillingCredit } from "@/hooks/useApi"; +import { useLocalStorage } from "@/hooks/useLocalStorage"; +import { ChainIconClient } from "@/icons/ChainIcon"; import { formatToDollars } from "./formatToDollars"; interface CreditsItemProps { @@ -61,14 +61,14 @@ export const CreditsItem: React.FC = ({ alt="tw-credit" className="size-6" objectFit="contain" - src={require("../../../../../public/brand/thirdweb-icon.svg")} + src={require("../../../../public/brand/thirdweb-icon.svg")} /> ) : isStartupCredit ? ( tw-credit ) : null} diff --git a/apps/dashboard/src/components/settings/Account/Billing/PlanCard.tsx b/apps/dashboard/src/@/components/billing/PlanCard.tsx similarity index 92% rename from apps/dashboard/src/components/settings/Account/Billing/PlanCard.tsx rename to apps/dashboard/src/@/components/billing/PlanCard.tsx index fbdcdf71d53..57851c027db 100644 --- a/apps/dashboard/src/components/settings/Account/Billing/PlanCard.tsx +++ b/apps/dashboard/src/@/components/billing/PlanCard.tsx @@ -2,11 +2,8 @@ // TODO - convert to RSC -import { - type Account, - useAccountCredits, -} from "@3rdweb-sdk/react/hooks/useApi"; import type { ThirdwebClient } from "thirdweb"; +import { type Account, useAccountCredits } from "@/hooks/useApi"; import { CreditsItem } from "./CreditsItem"; export const CreditsInfoCard = (props: { diff --git a/apps/dashboard/src/components/settings/Account/Billing/Pricing.tsx b/apps/dashboard/src/@/components/billing/Pricing.tsx similarity index 94% rename from apps/dashboard/src/components/settings/Account/Billing/Pricing.tsx rename to apps/dashboard/src/@/components/billing/Pricing.tsx index 725883f8f19..a0bf9d61554 100644 --- a/apps/dashboard/src/components/settings/Account/Billing/Pricing.tsx +++ b/apps/dashboard/src/@/components/billing/Pricing.tsx @@ -4,11 +4,10 @@ import { useTransition } from "react"; import type { Team } from "@/api/team"; import { PricingCard } from "@/components/blocks/pricing-card"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { PRO_CONTACT_US_URL } from "@/constants/pro"; +import { useStripeRedirectEvent } from "@/hooks/stripe/redirect-event"; import { useDashboardRouter } from "@/lib/DashboardRouter"; - -import { useStripeRedirectEvent } from "../../../../app/(app)/(stripe)/stripe-redirect/stripeRedirectChannel"; -import { getValidTeamPlan } from "../../../../app/(app)/team/components/TeamHeader/getValidTeamPlan"; -import { PRO_CONTACT_US_URL } from "../../../../constants/pro"; +import { getValidTeamPlan } from "@/utils/getValidTeamPlan"; // this is used to determine whether to show "Upgrade" or "Downgrade" label based on tier level const planToTierRecord: Record = { diff --git a/apps/dashboard/src/components/settings/Account/Billing/SubscriptionCoupons/Coupons.stories.tsx b/apps/dashboard/src/@/components/billing/SubscriptionCoupons/Coupons.stories.tsx similarity index 100% rename from apps/dashboard/src/components/settings/Account/Billing/SubscriptionCoupons/Coupons.stories.tsx rename to apps/dashboard/src/@/components/billing/SubscriptionCoupons/Coupons.stories.tsx diff --git a/apps/dashboard/src/components/settings/Account/Billing/SubscriptionCoupons/Coupons.tsx b/apps/dashboard/src/@/components/billing/SubscriptionCoupons/Coupons.tsx similarity index 96% rename from apps/dashboard/src/components/settings/Account/Billing/SubscriptionCoupons/Coupons.tsx rename to apps/dashboard/src/@/components/billing/SubscriptionCoupons/Coupons.tsx index c9a29eb163d..69fb3f5b5a5 100644 --- a/apps/dashboard/src/components/settings/Account/Billing/SubscriptionCoupons/Coupons.tsx +++ b/apps/dashboard/src/@/components/billing/SubscriptionCoupons/Coupons.tsx @@ -1,6 +1,6 @@ import { Suspense } from "react"; +import { getAuthToken } from "@/api/auth-token"; import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; -import { getAuthToken } from "../../../../../app/(app)/api/lib/getAuthToken"; import { CouponsClient } from "./CouponsClient"; import type { CouponData } from "./CouponsUI"; diff --git a/apps/dashboard/src/components/settings/Account/Billing/SubscriptionCoupons/CouponsClient.tsx b/apps/dashboard/src/@/components/billing/SubscriptionCoupons/CouponsClient.tsx similarity index 100% rename from apps/dashboard/src/components/settings/Account/Billing/SubscriptionCoupons/CouponsClient.tsx rename to apps/dashboard/src/@/components/billing/SubscriptionCoupons/CouponsClient.tsx diff --git a/apps/dashboard/src/components/settings/Account/Billing/SubscriptionCoupons/CouponsUI.tsx b/apps/dashboard/src/@/components/billing/SubscriptionCoupons/CouponsUI.tsx similarity index 100% rename from apps/dashboard/src/components/settings/Account/Billing/SubscriptionCoupons/CouponsUI.tsx rename to apps/dashboard/src/@/components/billing/SubscriptionCoupons/CouponsUI.tsx diff --git a/apps/dashboard/src/@/components/billing.tsx b/apps/dashboard/src/@/components/billing/billing.tsx similarity index 92% rename from apps/dashboard/src/@/components/billing.tsx rename to apps/dashboard/src/@/components/billing/billing.tsx index fbb30634b53..a5e46fa54c1 100644 --- a/apps/dashboard/src/@/components/billing.tsx +++ b/apps/dashboard/src/@/components/billing/billing.tsx @@ -1,14 +1,14 @@ "use client"; import { AlertTriangleIcon } from "lucide-react"; import Link from "next/link"; +import type { Team } from "@/api/team"; +import { Button, type ButtonProps } from "@/components/ui/button"; +import { cn } from "@/lib/utils"; +import type { ProductSKU } from "@/types/billing"; import { buildBillingPortalUrl, buildCheckoutUrl, -} from "../../app/(app)/(stripe)/utils/build-url"; -import type { Team } from "../api/team"; -import type { ProductSKU } from "../lib/billing"; -import { cn } from "../lib/utils"; -import { Button, type ButtonProps } from "./ui/button"; +} from "@/utils/stripe/build-url"; export function CheckoutButton(props: { buttonProps?: Omit; diff --git a/apps/dashboard/src/components/settings/Account/Billing/formatToDollars.tsx b/apps/dashboard/src/@/components/billing/formatToDollars.tsx similarity index 100% rename from apps/dashboard/src/components/settings/Account/Billing/formatToDollars.tsx rename to apps/dashboard/src/@/components/billing/formatToDollars.tsx diff --git a/apps/dashboard/src/components/settings/Account/Billing/renew-subscription/renew-subscription-button.tsx b/apps/dashboard/src/@/components/billing/renew-subscription/renew-subscription-button.tsx similarity index 94% rename from apps/dashboard/src/components/settings/Account/Billing/renew-subscription/renew-subscription-button.tsx rename to apps/dashboard/src/@/components/billing/renew-subscription/renew-subscription-button.tsx index 7470c418c6b..998d588537d 100644 --- a/apps/dashboard/src/components/settings/Account/Billing/renew-subscription/renew-subscription-button.tsx +++ b/apps/dashboard/src/@/components/billing/renew-subscription/renew-subscription-button.tsx @@ -9,8 +9,8 @@ import type { Team } from "@/api/team"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { pollWithTimeout } from "../../../../../utils/pollWithTimeout"; -import { tryCatch } from "../../../../../utils/try-catch"; +import { pollWithTimeout } from "../../../utils/pollWithTimeout"; +import { tryCatch } from "../../../utils/try-catch"; export function RenewSubscriptionButton(props: { teamId: string; diff --git a/apps/dashboard/src/components/inputs/BasisPointsInput.tsx b/apps/dashboard/src/@/components/blocks/BasisPointsInput.tsx similarity index 100% rename from apps/dashboard/src/components/inputs/BasisPointsInput.tsx rename to apps/dashboard/src/@/components/blocks/BasisPointsInput.tsx diff --git a/apps/dashboard/src/components/shared/CurrencySelector.tsx b/apps/dashboard/src/@/components/blocks/CurrencySelector.tsx similarity index 97% rename from apps/dashboard/src/components/shared/CurrencySelector.tsx rename to apps/dashboard/src/@/components/blocks/CurrencySelector.tsx index ac3d71ec43c..d75a2f0f26c 100644 --- a/apps/dashboard/src/components/shared/CurrencySelector.tsx +++ b/apps/dashboard/src/@/components/blocks/CurrencySelector.tsx @@ -1,5 +1,3 @@ -import { CURRENCIES, type CurrencyMetadata } from "constants/currencies"; -import { useAllChainsData } from "hooks/chains/allChains"; import { useMemo, useState } from "react"; import { isAddress, NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS } from "thirdweb"; import { Button } from "@/components/ui/button"; @@ -11,6 +9,8 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { CURRENCIES, type CurrencyMetadata } from "@/constants/currencies"; +import { useAllChainsData } from "@/hooks/chains/allChains"; import { cn } from "@/lib/utils"; interface CurrencySelectorProps { diff --git a/apps/dashboard/src/@/components/blocks/DangerSettingCard.stories.tsx b/apps/dashboard/src/@/components/blocks/DangerSettingCard.stories.tsx index 8ab5bcb0dc1..cdd5f2bec43 100644 --- a/apps/dashboard/src/@/components/blocks/DangerSettingCard.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/DangerSettingCard.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { DangerSettingCard } from "./DangerSettingCard"; const meta = { diff --git a/apps/dashboard/src/components/shared/DocLink.tsx b/apps/dashboard/src/@/components/blocks/DocLink.tsx similarity index 100% rename from apps/dashboard/src/components/shared/DocLink.tsx rename to apps/dashboard/src/@/components/blocks/DocLink.tsx diff --git a/apps/dashboard/src/components/shared/FileInput.tsx b/apps/dashboard/src/@/components/blocks/FileInput.tsx similarity index 100% rename from apps/dashboard/src/components/shared/FileInput.tsx rename to apps/dashboard/src/@/components/blocks/FileInput.tsx diff --git a/apps/dashboard/src/components/settings/Account/Billing/GatedSwitch.stories.tsx b/apps/dashboard/src/@/components/blocks/GatedSwitch.stories.tsx similarity index 97% rename from apps/dashboard/src/components/settings/Account/Billing/GatedSwitch.stories.tsx rename to apps/dashboard/src/@/components/blocks/GatedSwitch.stories.tsx index ae0e6a57b33..05814a17551 100644 --- a/apps/dashboard/src/components/settings/Account/Billing/GatedSwitch.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/GatedSwitch.stories.tsx @@ -9,7 +9,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { BadgeContainer } from "../../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { GatedSwitch } from "./GatedSwitch"; const meta = { diff --git a/apps/dashboard/src/components/settings/Account/Billing/GatedSwitch.tsx b/apps/dashboard/src/@/components/blocks/GatedSwitch.tsx similarity index 93% rename from apps/dashboard/src/components/settings/Account/Billing/GatedSwitch.tsx rename to apps/dashboard/src/@/components/blocks/GatedSwitch.tsx index 8684f65b9ff..fe93773e90c 100644 --- a/apps/dashboard/src/components/settings/Account/Billing/GatedSwitch.tsx +++ b/apps/dashboard/src/@/components/blocks/GatedSwitch.tsx @@ -4,12 +4,9 @@ import type { Team } from "@/api/team"; import { Button } from "@/components/ui/button"; import { Switch } from "@/components/ui/switch"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { planToTierRecordForGating } from "@/constants/planToTierRecord"; import { cn } from "@/lib/utils"; -import { - getTeamPlanBadgeLabel, - TeamPlanBadge, -} from "../../../../app/(app)/components/TeamPlanBadge"; -import { planToTierRecordForGating } from "./planToTierRecord"; +import { getTeamPlanBadgeLabel, TeamPlanBadge } from "./TeamPlanBadge"; type SwitchProps = React.ComponentProps; diff --git a/apps/dashboard/src/@/components/blocks/Img.stories.tsx b/apps/dashboard/src/@/components/blocks/Img.stories.tsx index aead7195de1..2d723fe646a 100644 --- a/apps/dashboard/src/@/components/blocks/Img.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/Img.stories.tsx @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { ImageIcon } from "lucide-react"; import { useState } from "react"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { Button } from "../ui/button"; import { Spinner } from "../ui/Spinner/Spinner"; import { Img } from "./Img"; diff --git a/apps/dashboard/src/@/components/blocks/Img.tsx b/apps/dashboard/src/@/components/blocks/Img.tsx index 2884cf09e58..3a185bd90c1 100644 --- a/apps/dashboard/src/@/components/blocks/Img.tsx +++ b/apps/dashboard/src/@/components/blocks/Img.tsx @@ -1,8 +1,8 @@ /* eslint-disable @next/next/no-img-element */ "use client"; import { useRef, useState } from "react"; +import { cn } from "@/lib/utils"; import { useIsomorphicLayoutEffect } from "../../lib/useIsomorphicLayoutEffect"; -import { cn } from "../../lib/utils"; type imgElementProps = React.DetailedHTMLProps< React.ImgHTMLAttributes, diff --git a/apps/dashboard/src/@/components/blocks/MobileSidebar.tsx b/apps/dashboard/src/@/components/blocks/MobileSidebar.tsx index 6d38e34524a..54a330470d3 100644 --- a/apps/dashboard/src/@/components/blocks/MobileSidebar.tsx +++ b/apps/dashboard/src/@/components/blocks/MobileSidebar.tsx @@ -5,7 +5,7 @@ import { usePathname } from "next/navigation"; import { useMemo, useState } from "react"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog"; -import { cn } from "../../lib/utils"; +import { cn } from "@/lib/utils"; import { RenderSidebarLinks, type SidebarBaseLink, diff --git a/apps/dashboard/src/@/components/blocks/MultiNetworkSelector.stories.tsx b/apps/dashboard/src/@/components/blocks/MultiNetworkSelector.stories.tsx index 70563522ce7..376daf9bdf1 100644 --- a/apps/dashboard/src/@/components/blocks/MultiNetworkSelector.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/MultiNetworkSelector.stories.tsx @@ -1,9 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useState } from "react"; -import { - BadgeContainer, - storybookThirdwebClient, -} from "../../../stories/utils"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { MultiNetworkSelector } from "./NetworkSelectors"; const meta = { diff --git a/apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx b/apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx index 0c0fdce92d6..48091acc635 100644 --- a/apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx +++ b/apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx @@ -1,12 +1,12 @@ "use client"; -import { ChainIconClient } from "components/icons/ChainIcon"; -import { useAllChainsData } from "hooks/chains/allChains"; import { useCallback, useMemo } from "react"; import type { ThirdwebClient } from "thirdweb"; import { MultiSelect } from "@/components/blocks/multi-select"; import { SelectWithSearch } from "@/components/blocks/select-with-search"; import { Badge } from "@/components/ui/badge"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { ChainIconClient } from "@/icons/ChainIcon"; function cleanChainName(chainName: string) { return chainName.replace("Mainnet", ""); diff --git a/apps/dashboard/src/@/components/Responsive.tsx b/apps/dashboard/src/@/components/blocks/Responsive.tsx similarity index 91% rename from apps/dashboard/src/@/components/Responsive.tsx rename to apps/dashboard/src/@/components/blocks/Responsive.tsx index 382258f927d..a58d4869e6f 100644 --- a/apps/dashboard/src/@/components/Responsive.tsx +++ b/apps/dashboard/src/@/components/blocks/Responsive.tsx @@ -1,7 +1,7 @@ "use client"; import { Suspense } from "react"; import { ClientOnly } from "@/components/blocks/client-only"; -import { useIsMobile } from "../hooks/use-mobile"; +import { useIsMobile } from "@/hooks/use-mobile"; export function ResponsiveLayout(props: { desktop: React.ReactNode; diff --git a/apps/dashboard/src/@/components/blocks/SettingsCard.stories.tsx b/apps/dashboard/src/@/components/blocks/SettingsCard.stories.tsx index 4921dadff40..5d34f3136bb 100644 --- a/apps/dashboard/src/@/components/blocks/SettingsCard.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/SettingsCard.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { SettingsCard } from "./SettingsCard"; const meta = { diff --git a/apps/dashboard/src/@/components/blocks/SidebarLayout.tsx b/apps/dashboard/src/@/components/blocks/SidebarLayout.tsx index 7f85ee9fade..8693857878a 100644 --- a/apps/dashboard/src/@/components/blocks/SidebarLayout.tsx +++ b/apps/dashboard/src/@/components/blocks/SidebarLayout.tsx @@ -13,9 +13,9 @@ import { useSidebar, } from "@/components/ui/sidebar"; import { cn } from "../../lib/utils"; +import { AppFooter } from "../footers/app-footer"; import { NavLink } from "../ui/NavLink"; import { Separator } from "../ui/separator"; -import { AppFooter } from "./app-footer"; import { MobileSidebar, useActiveSidebarLink } from "./MobileSidebar"; import { CustomSidebar, type SidebarLink } from "./Sidebar"; diff --git a/apps/dashboard/src/@/components/blocks/SingleNetworkSelector.stories.tsx b/apps/dashboard/src/@/components/blocks/SingleNetworkSelector.stories.tsx index 12c2b15ba0b..fcfd036149d 100644 --- a/apps/dashboard/src/@/components/blocks/SingleNetworkSelector.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/SingleNetworkSelector.stories.tsx @@ -1,9 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useState } from "react"; -import { - BadgeContainer, - storybookThirdwebClient, -} from "../../../stories/utils"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { SingleNetworkSelector } from "./NetworkSelectors"; const meta = { diff --git a/apps/dashboard/src/components/dashboard/StepsCard.stories.tsx b/apps/dashboard/src/@/components/blocks/StepsCard.stories.tsx similarity index 96% rename from apps/dashboard/src/components/dashboard/StepsCard.stories.tsx rename to apps/dashboard/src/@/components/blocks/StepsCard.stories.tsx index 8efe850ac0b..d7fafb3df48 100644 --- a/apps/dashboard/src/components/dashboard/StepsCard.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/StepsCard.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "../../stories/utils"; -import { StepsCard } from "./StepsCard"; +import { StepsCard } from "@/components/blocks/StepsCard"; +import { BadgeContainer } from "@/storybook/utils"; const meta = { component: Component, diff --git a/apps/dashboard/src/components/dashboard/StepsCard.tsx b/apps/dashboard/src/@/components/blocks/StepsCard.tsx similarity index 100% rename from apps/dashboard/src/components/dashboard/StepsCard.tsx rename to apps/dashboard/src/@/components/blocks/StepsCard.tsx diff --git a/apps/dashboard/src/components/shared/TWTable.tsx b/apps/dashboard/src/@/components/blocks/TWTable.tsx similarity index 100% rename from apps/dashboard/src/components/shared/TWTable.tsx rename to apps/dashboard/src/@/components/blocks/TWTable.tsx diff --git a/apps/dashboard/src/app/(app)/components/TeamPlanBadge.tsx b/apps/dashboard/src/@/components/blocks/TeamPlanBadge.tsx similarity index 95% rename from apps/dashboard/src/app/(app)/components/TeamPlanBadge.tsx rename to apps/dashboard/src/@/components/blocks/TeamPlanBadge.tsx index 679966821cc..b7d0876e823 100644 --- a/apps/dashboard/src/app/(app)/components/TeamPlanBadge.tsx +++ b/apps/dashboard/src/@/components/blocks/TeamPlanBadge.tsx @@ -2,8 +2,8 @@ import type { Team } from "@/api/team"; import { Badge, type BadgeProps } from "@/components/ui/badge"; +import { useDashboardRouter } from "@/lib/DashboardRouter"; import { cn } from "@/lib/utils"; -import { useDashboardRouter } from "../../../@/lib/DashboardRouter"; const teamPlanToBadgeVariant: Record< Team["billingPlan"], diff --git a/apps/dashboard/src/@/components/blocks/TokenSelector.stories.tsx b/apps/dashboard/src/@/components/blocks/TokenSelector.stories.tsx index 8967c786b1f..862785ad400 100644 --- a/apps/dashboard/src/@/components/blocks/TokenSelector.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/TokenSelector.stories.tsx @@ -1,9 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useState } from "react"; -import { - BadgeContainer, - storybookThirdwebClient, -} from "../../../stories/utils"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { TokenSelector } from "./TokenSelector"; const meta = { diff --git a/apps/dashboard/src/@/components/blocks/TokenSelector.tsx b/apps/dashboard/src/@/components/blocks/TokenSelector.tsx index be1d3921f67..872a9e46663 100644 --- a/apps/dashboard/src/@/components/blocks/TokenSelector.tsx +++ b/apps/dashboard/src/@/components/blocks/TokenSelector.tsx @@ -1,5 +1,3 @@ -import { useAllChainsData } from "hooks/chains/allChains"; -import { useTokensData } from "hooks/tokens/tokens"; import { useCallback, useMemo } from "react"; import { getAddress, @@ -7,13 +5,15 @@ import { type ThirdwebClient, } from "thirdweb"; import { shortenAddress } from "thirdweb/utils"; -import { replaceIpfsUrl } from "../../../lib/sdk"; -import { fallbackChainIcon } from "../../../utils/chain-icons"; -import type { TokenMetadata } from "../../api/universal-bridge/tokens"; -import { cn } from "../../lib/utils"; -import { Badge } from "../ui/badge"; -import { Img } from "./Img"; -import { SelectWithSearch } from "./select-with-search"; +import type { TokenMetadata } from "@/api/universal-bridge/tokens"; +import { Img } from "@/components/blocks/Img"; +import { SelectWithSearch } from "@/components/blocks/select-with-search"; +import { Badge } from "@/components/ui/badge"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { useTokensData } from "@/hooks/tokens"; +import { replaceIpfsUrl } from "@/lib/sdk"; +import { cn } from "@/lib/utils"; +import { fallbackChainIcon } from "@/utils/chain-icons"; type Option = { label: string; value: string }; diff --git a/apps/dashboard/src/@/components/blocks/UpsellBannerCard.stories.tsx b/apps/dashboard/src/@/components/blocks/UpsellBannerCard.stories.tsx index f689dba3afe..693f368568b 100644 --- a/apps/dashboard/src/@/components/blocks/UpsellBannerCard.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/UpsellBannerCard.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { ArrowRightIcon, RocketIcon, StarIcon } from "lucide-react"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { UpsellBannerCard } from "./UpsellBannerCard"; function Story() { diff --git a/apps/dashboard/src/@/components/blocks/Avatars/GradientBlobbie.tsx b/apps/dashboard/src/@/components/blocks/avatar/GradientBlobbie.tsx similarity index 100% rename from apps/dashboard/src/@/components/blocks/Avatars/GradientBlobbie.tsx rename to apps/dashboard/src/@/components/blocks/avatar/GradientBlobbie.tsx diff --git a/apps/dashboard/src/@/components/blocks/Avatars/GradientAvatar.stories.tsx b/apps/dashboard/src/@/components/blocks/avatar/gradient-avatar.stories.tsx similarity index 96% rename from apps/dashboard/src/@/components/blocks/Avatars/GradientAvatar.stories.tsx rename to apps/dashboard/src/@/components/blocks/avatar/gradient-avatar.stories.tsx index a49cec2a51d..397ebef51cd 100644 --- a/apps/dashboard/src/@/components/blocks/Avatars/GradientAvatar.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/avatar/gradient-avatar.stories.tsx @@ -1,11 +1,8 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useState } from "react"; -import { - BadgeContainer, - storybookThirdwebClient, -} from "../../../../stories/utils"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { Button } from "../../ui/button"; -import { GradientAvatar } from "./GradientAvatar"; +import { GradientAvatar } from "./gradient-avatar"; const meta = { component: Story, diff --git a/apps/dashboard/src/@/components/blocks/Avatars/GradientAvatar.tsx b/apps/dashboard/src/@/components/blocks/avatar/gradient-avatar.tsx similarity index 82% rename from apps/dashboard/src/@/components/blocks/Avatars/GradientAvatar.tsx rename to apps/dashboard/src/@/components/blocks/avatar/gradient-avatar.tsx index 195a2e1243b..b2ab5ae234c 100644 --- a/apps/dashboard/src/@/components/blocks/Avatars/GradientAvatar.tsx +++ b/apps/dashboard/src/@/components/blocks/avatar/gradient-avatar.tsx @@ -1,7 +1,7 @@ import type { ThirdwebClient } from "thirdweb"; import { Img } from "@/components/blocks/Img"; -import { resolveSchemeWithErrorHandler } from "../../../lib/resolveSchemeWithErrorHandler"; -import { cn } from "../../../lib/utils"; +import { cn } from "@/lib/utils"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; import { GradientBlobbie } from "./GradientBlobbie"; export function GradientAvatar(props: { diff --git a/apps/dashboard/src/@/components/blocks/Avatars/ProjectAvatar.stories.tsx b/apps/dashboard/src/@/components/blocks/avatar/project-avatar.stories.tsx similarity index 93% rename from apps/dashboard/src/@/components/blocks/Avatars/ProjectAvatar.stories.tsx rename to apps/dashboard/src/@/components/blocks/avatar/project-avatar.stories.tsx index 5bb27b423dd..63ee9dfbc13 100644 --- a/apps/dashboard/src/@/components/blocks/Avatars/ProjectAvatar.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/avatar/project-avatar.stories.tsx @@ -1,11 +1,8 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useState } from "react"; -import { - BadgeContainer, - storybookThirdwebClient, -} from "../../../../stories/utils"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { Button } from "../../ui/button"; -import { ProjectAvatar } from "./ProjectAvatar"; +import { ProjectAvatar } from "./project-avatar"; const meta = { component: Story, diff --git a/apps/dashboard/src/@/components/blocks/Avatars/ProjectAvatar.tsx b/apps/dashboard/src/@/components/blocks/avatar/project-avatar.tsx similarity index 84% rename from apps/dashboard/src/@/components/blocks/Avatars/ProjectAvatar.tsx rename to apps/dashboard/src/@/components/blocks/avatar/project-avatar.tsx index cfd250feb54..ebd02af7a09 100644 --- a/apps/dashboard/src/@/components/blocks/Avatars/ProjectAvatar.tsx +++ b/apps/dashboard/src/@/components/blocks/avatar/project-avatar.tsx @@ -1,8 +1,8 @@ import { BoxIcon } from "lucide-react"; import type { ThirdwebClient } from "thirdweb"; import { Img } from "@/components/blocks/Img"; -import { resolveSchemeWithErrorHandler } from "../../../lib/resolveSchemeWithErrorHandler"; -import { cn } from "../../../lib/utils"; +import { cn } from "@/lib/utils"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; export function ProjectAvatar(props: { src: string | undefined; diff --git a/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx b/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx index 22cd5fc8d4b..afc6a22d283 100644 --- a/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx +++ b/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx @@ -1,12 +1,12 @@ "use client"; -import { - EmptyChartState, - LoadingChartState, -} from "components/analytics/empty-chart-state"; import { format } from "date-fns"; import { useMemo } from "react"; import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts"; +import { + EmptyChartState, + LoadingChartState, +} from "@/components/analytics/empty-chart-state"; import { Card, CardContent, diff --git a/apps/dashboard/src/@/components/blocks/charts/bar-chart.tsx b/apps/dashboard/src/@/components/blocks/charts/bar-chart.tsx index 68a9ec6880a..f7c866a5e5d 100644 --- a/apps/dashboard/src/@/components/blocks/charts/bar-chart.tsx +++ b/apps/dashboard/src/@/components/blocks/charts/bar-chart.tsx @@ -1,12 +1,12 @@ "use client"; -import { - EmptyChartState, - LoadingChartState, -} from "components/analytics/empty-chart-state"; import { format } from "date-fns"; import { useMemo } from "react"; import { Bar, BarChart, CartesianGrid, XAxis } from "recharts"; +import { + EmptyChartState, + LoadingChartState, +} from "@/components/analytics/empty-chart-state"; import { Card, CardContent, diff --git a/apps/dashboard/src/@/components/blocks/code-segment.client.tsx b/apps/dashboard/src/@/components/blocks/code/code-segment.client.tsx similarity index 98% rename from apps/dashboard/src/@/components/blocks/code-segment.client.tsx rename to apps/dashboard/src/@/components/blocks/code/code-segment.client.tsx index 39a01462401..9f43129e053 100644 --- a/apps/dashboard/src/@/components/blocks/code-segment.client.tsx +++ b/apps/dashboard/src/@/components/blocks/code/code-segment.client.tsx @@ -2,7 +2,7 @@ import type React from "react"; import { type Dispatch, type SetStateAction, useMemo } from "react"; import { CodeClient } from "@/components/ui/code/code.client"; -import { TabButtons } from "../ui/tabs"; +import { TabButtons } from "@/components/ui/tabs"; export type CodeEnvironment = | "javascript" diff --git a/apps/dashboard/src/@/components/blocks/code-segment.stories.tsx b/apps/dashboard/src/@/components/blocks/code/code-segment.stories.tsx similarity index 98% rename from apps/dashboard/src/@/components/blocks/code-segment.stories.tsx rename to apps/dashboard/src/@/components/blocks/code/code-segment.stories.tsx index 2bf0c3d94c1..bd28ca1ca34 100644 --- a/apps/dashboard/src/@/components/blocks/code-segment.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/code/code-segment.stories.tsx @@ -1,6 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useState } from "react"; -import { BadgeContainer } from "stories/utils"; import { Select, SelectContent, @@ -9,6 +8,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { BadgeContainer } from "@/storybook/utils"; import { type CodeEnvironment, CodeSegment } from "./code-segment.client"; const meta = { diff --git a/apps/dashboard/src/@/components/color-mode-toggle.tsx b/apps/dashboard/src/@/components/blocks/color-mode-toggle.tsx similarity index 95% rename from apps/dashboard/src/@/components/color-mode-toggle.tsx rename to apps/dashboard/src/@/components/blocks/color-mode-toggle.tsx index 69fa420315d..4d22373aebe 100644 --- a/apps/dashboard/src/@/components/color-mode-toggle.tsx +++ b/apps/dashboard/src/@/components/blocks/color-mode-toggle.tsx @@ -4,7 +4,7 @@ import { MoonIcon, SunIcon } from "lucide-react"; import { useTheme } from "next-themes"; import { ClientOnly } from "@/components/blocks/client-only"; import { Button } from "@/components/ui/button"; -import { Skeleton } from "./ui/skeleton"; +import { Skeleton } from "../ui/skeleton"; export function ToggleThemeButton() { const { setTheme, theme } = useTheme(); diff --git a/apps/dashboard/src/@/components/blocks/dismissible-alert.tsx b/apps/dashboard/src/@/components/blocks/dismissible-alert.tsx index 3bc132f3b93..88aa4bd41b1 100644 --- a/apps/dashboard/src/@/components/blocks/dismissible-alert.tsx +++ b/apps/dashboard/src/@/components/blocks/dismissible-alert.tsx @@ -1,8 +1,8 @@ "use client"; -import { useLocalStorage } from "hooks/useLocalStorage"; import { XIcon } from "lucide-react"; -import { Button } from "../ui/button"; +import { Button } from "@/components/ui/button"; +import { useLocalStorage } from "@/hooks/useLocalStorage"; export function DismissibleAlert(props: { title: React.ReactNode; diff --git a/apps/dashboard/src/components/contract-components/published-contract/markdown-renderer.stories.tsx b/apps/dashboard/src/@/components/blocks/markdown-renderer.stories.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/published-contract/markdown-renderer.stories.tsx rename to apps/dashboard/src/@/components/blocks/markdown-renderer.stories.tsx diff --git a/apps/dashboard/src/components/contract-components/published-contract/markdown-renderer.tsx b/apps/dashboard/src/@/components/blocks/markdown-renderer.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/published-contract/markdown-renderer.tsx rename to apps/dashboard/src/@/components/blocks/markdown-renderer.tsx diff --git a/apps/dashboard/src/@/components/blocks/media-renderer.tsx b/apps/dashboard/src/@/components/blocks/media-renderer.tsx index 28b5054c3e6..a7148606bd5 100644 --- a/apps/dashboard/src/@/components/blocks/media-renderer.tsx +++ b/apps/dashboard/src/@/components/blocks/media-renderer.tsx @@ -2,8 +2,8 @@ import { useEffect, useState } from "react"; import { MediaRenderer, type MediaRendererProps } from "thirdweb/react"; -import { cn } from "../../lib/utils"; -import { Skeleton } from "../ui/skeleton"; +import { Skeleton } from "@/components/ui/skeleton"; +import { cn } from "@/lib/utils"; export function CustomMediaRenderer(props: MediaRendererProps) { const [loadedSrc, setLoadedSrc] = useState(undefined); diff --git a/apps/dashboard/src/@/components/blocks/multi-select.stories.tsx b/apps/dashboard/src/@/components/blocks/multi-select.stories.tsx index 0c3af5cc055..e39aea925b2 100644 --- a/apps/dashboard/src/@/components/blocks/multi-select.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/multi-select.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useMemo, useState } from "react"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { MultiSelect } from "./multi-select"; const meta = { diff --git a/apps/dashboard/src/@/components/blocks/multi-select.tsx b/apps/dashboard/src/@/components/blocks/multi-select.tsx index 9a2c118c877..f36b90754e6 100644 --- a/apps/dashboard/src/@/components/blocks/multi-select.tsx +++ b/apps/dashboard/src/@/components/blocks/multi-select.tsx @@ -4,16 +4,16 @@ import { CheckIcon, ChevronDownIcon, SearchIcon, XIcon } from "lucide-react"; import { forwardRef, useCallback, useMemo, useRef, useState } from "react"; import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; +import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; import { Separator } from "@/components/ui/separator"; +import { useShowMore } from "@/hooks/useShowMore"; import { cn } from "@/lib/utils"; -import { useShowMore } from "../../lib/useShowMore"; -import { Input } from "../ui/input"; -import { ScrollShadow } from "../ui/ScrollShadow/ScrollShadow"; interface MultiSelectProps extends React.ButtonHTMLAttributes { diff --git a/apps/dashboard/src/tw-components/nft-media.tsx b/apps/dashboard/src/@/components/blocks/nft-media.tsx similarity index 100% rename from apps/dashboard/src/tw-components/nft-media.tsx rename to apps/dashboard/src/@/components/blocks/nft-media.tsx diff --git a/apps/dashboard/src/@/components/pagination-buttons.stories.tsx b/apps/dashboard/src/@/components/blocks/pagination-buttons.stories.tsx similarity index 90% rename from apps/dashboard/src/@/components/pagination-buttons.stories.tsx rename to apps/dashboard/src/@/components/blocks/pagination-buttons.stories.tsx index a04b882abe3..27c7cf32719 100644 --- a/apps/dashboard/src/@/components/pagination-buttons.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/pagination-buttons.stories.tsx @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useState } from "react"; -import { BadgeContainer } from "stories/utils"; -import { PaginationButtons } from "./pagination-buttons"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; +import { BadgeContainer } from "@/storybook/utils"; const meta = { component: Story, diff --git a/apps/dashboard/src/@/components/pagination-buttons.tsx b/apps/dashboard/src/@/components/blocks/pagination-buttons.tsx similarity index 97% rename from apps/dashboard/src/@/components/pagination-buttons.tsx rename to apps/dashboard/src/@/components/blocks/pagination-buttons.tsx index 0e64602da1d..c69406b2eec 100644 --- a/apps/dashboard/src/@/components/pagination-buttons.tsx +++ b/apps/dashboard/src/@/components/blocks/pagination-buttons.tsx @@ -2,6 +2,8 @@ import { ArrowUpRightIcon } from "lucide-react"; import { useState } from "react"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; import { Pagination, PaginationContent, @@ -11,9 +13,7 @@ import { PaginationNext, PaginationPrevious, } from "@/components/ui/pagination"; -import { cn } from "../lib/utils"; -import { Button } from "./ui/button"; -import { Input } from "./ui/input"; +import { cn } from "@/lib/utils"; export const PaginationButtons = (props: { activePage: number; diff --git a/apps/dashboard/src/@/components/blocks/pricing-card.tsx b/apps/dashboard/src/@/components/blocks/pricing-card.tsx index f8e51be3537..8de5b6484f3 100644 --- a/apps/dashboard/src/@/components/blocks/pricing-card.tsx +++ b/apps/dashboard/src/@/components/blocks/pricing-card.tsx @@ -1,17 +1,17 @@ "use client"; -import { RenewSubscriptionButton } from "components/settings/Account/Billing/renew-subscription/renew-subscription-button"; 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 type { Team } from "@/api/team"; +import { CheckoutButton } from "@/components/billing/billing"; +import { RenewSubscriptionButton } from "@/components/billing/renew-subscription/renew-subscription-button"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; -import type { ProductSKU } from "../../lib/billing"; -import { CheckoutButton } from "../billing"; +import type { ProductSKU } from "@/types/billing"; +import { remainingDays } from "@/utils/date-utils"; +import { TEAM_PLANS } from "@/utils/pricing"; type PricingCardCta = { hint?: string; diff --git a/apps/dashboard/src/@/components/blocks/select-with-search.stories.tsx b/apps/dashboard/src/@/components/blocks/select-with-search.stories.tsx index 46bad18f4bd..d9deefe53ec 100644 --- a/apps/dashboard/src/@/components/blocks/select-with-search.stories.tsx +++ b/apps/dashboard/src/@/components/blocks/select-with-search.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useMemo, useState } from "react"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { SelectWithSearch } from "./select-with-search"; const meta = { diff --git a/apps/dashboard/src/@/components/blocks/select-with-search.tsx b/apps/dashboard/src/@/components/blocks/select-with-search.tsx index ed3b8c4fd7e..4d3e6c91b64 100644 --- a/apps/dashboard/src/@/components/blocks/select-with-search.tsx +++ b/apps/dashboard/src/@/components/blocks/select-with-search.tsx @@ -3,15 +3,15 @@ import { CheckIcon, ChevronDownIcon, SearchIcon } from "lucide-react"; import React, { useMemo, useRef } from "react"; import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; +import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; +import { useShowMore } from "@/hooks/useShowMore"; import { cn } from "@/lib/utils"; -import { useShowMore } from "../../lib/useShowMore"; -import { Input } from "../ui/input"; -import { ScrollShadow } from "../ui/ScrollShadow/ScrollShadow"; interface SelectWithSearchProps extends React.ButtonHTMLAttributes { diff --git a/apps/dashboard/src/@/components/blocks/skeletons/GenericLoadingPage.tsx b/apps/dashboard/src/@/components/blocks/skeletons/GenericLoadingPage.tsx index bd3ce7076f6..fd475ddffe0 100644 --- a/apps/dashboard/src/@/components/blocks/skeletons/GenericLoadingPage.tsx +++ b/apps/dashboard/src/@/components/blocks/skeletons/GenericLoadingPage.tsx @@ -1,7 +1,7 @@ "use client"; import { Spinner } from "@/components/ui/Spinner/Spinner"; -import { cn } from "../../../lib/utils"; +import { cn } from "@/lib/utils"; export function GenericLoadingPage({ className }: { className?: string }) { return ( diff --git a/apps/dashboard/src/@/components/blocks/upsell-wrapper.tsx b/apps/dashboard/src/@/components/blocks/upsell-wrapper.tsx index f746dbc5326..943589c7596 100644 --- a/apps/dashboard/src/@/components/blocks/upsell-wrapper.tsx +++ b/apps/dashboard/src/@/components/blocks/upsell-wrapper.tsx @@ -3,6 +3,9 @@ import { CrownIcon, LockIcon, SparklesIcon } from "lucide-react"; import Link from "next/link"; import type React from "react"; +import type { Team } from "@/api/team"; +import { TeamPlanBadge } from "@/components/blocks/TeamPlanBadge"; +import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card, @@ -12,9 +15,6 @@ import { CardTitle, } from "@/components/ui/card"; import { cn } from "@/lib/utils"; -import { TeamPlanBadge } from "../../../app/(app)/components/TeamPlanBadge"; -import type { Team } from "../../api/team"; -import { Badge } from "../ui/badge"; interface UpsellWrapperProps { teamSlug: string; diff --git a/apps/dashboard/src/@/components/blocks/wallet-address.tsx b/apps/dashboard/src/@/components/blocks/wallet-address.tsx index c43b9e36c8b..1703458514c 100644 --- a/apps/dashboard/src/@/components/blocks/wallet-address.tsx +++ b/apps/dashboard/src/@/components/blocks/wallet-address.tsx @@ -1,21 +1,21 @@ "use client"; -import { useClipboard } from "hooks/useClipboard"; import { CheckIcon, CopyIcon, XIcon } from "lucide-react"; import { useMemo } from "react"; import { isAddress, type ThirdwebClient, ZERO_ADDRESS } from "thirdweb"; import { Blobbie, type SocialProfile, useSocialProfiles } from "thirdweb/react"; +import { Img } from "@/components/blocks/Img"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; +import { Badge } from "@/components/ui/badge"; +import { Button } from "@/components/ui/button"; import { HoverCard, HoverCardContent, HoverCardTrigger, } from "@/components/ui/hover-card"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; -import { cn } from "../../lib/utils"; -import { Badge } from "../ui/badge"; -import { Button } from "../ui/button"; -import { ToolTipLabel } from "../ui/tooltip"; -import { Img } from "./Img"; +import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useClipboard } from "@/hooks/useClipboard"; +import { cn } from "@/lib/utils"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; export function WalletAddress(props: { address: string | undefined; diff --git a/apps/dashboard/src/components/CustomChat/ChatBar.tsx b/apps/dashboard/src/@/components/chat/ChatBar.tsx similarity index 100% rename from apps/dashboard/src/components/CustomChat/ChatBar.tsx rename to apps/dashboard/src/@/components/chat/ChatBar.tsx diff --git a/apps/dashboard/src/components/CustomChat/CustomChatButton.tsx b/apps/dashboard/src/@/components/chat/CustomChatButton.tsx similarity index 100% rename from apps/dashboard/src/components/CustomChat/CustomChatButton.tsx rename to apps/dashboard/src/@/components/chat/CustomChatButton.tsx diff --git a/apps/dashboard/src/components/CustomChat/CustomChatContent.tsx b/apps/dashboard/src/@/components/chat/CustomChatContent.tsx similarity index 99% rename from apps/dashboard/src/components/CustomChat/CustomChatContent.tsx rename to apps/dashboard/src/@/components/chat/CustomChatContent.tsx index 2df0463fda3..6d46e6e0092 100644 --- a/apps/dashboard/src/components/CustomChat/CustomChatContent.tsx +++ b/apps/dashboard/src/@/components/chat/CustomChatContent.tsx @@ -6,7 +6,7 @@ import { useCallback, useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import { useActiveWalletConnectionStatus } from "thirdweb/react"; import { Button } from "@/components/ui/button"; -import { NebulaIcon } from "../../app/(app)/(dashboard)/(chain)/components/server/icons/NebulaIcon"; +import { NebulaIcon } from "@/icons/NebulaIcon"; import { ChatBar } from "./ChatBar"; import type { UserMessage, UserMessageContent } from "./CustomChats"; import { type CustomChatMessage, CustomChats } from "./CustomChats"; diff --git a/apps/dashboard/src/components/CustomChat/CustomChats.tsx b/apps/dashboard/src/@/components/chat/CustomChats.tsx similarity index 98% rename from apps/dashboard/src/components/CustomChat/CustomChats.tsx rename to apps/dashboard/src/@/components/chat/CustomChats.tsx index 16ac0b67049..d3953f18f7b 100644 --- a/apps/dashboard/src/components/CustomChat/CustomChats.tsx +++ b/apps/dashboard/src/@/components/chat/CustomChats.tsx @@ -1,4 +1,3 @@ -import { MarkdownRenderer } from "components/contract-components/published-contract/markdown-renderer"; import { AlertCircleIcon, MessageCircleIcon, @@ -7,6 +6,7 @@ import { } from "lucide-react"; import { useEffect, useRef, useState } from "react"; import type { ThirdwebClient } from "thirdweb"; +import { MarkdownRenderer } from "@/components/blocks/markdown-renderer"; import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; import { cn } from "@/lib/utils"; import { Reasoning } from "./Reasoning"; diff --git a/apps/dashboard/src/components/CustomChat/Reasoning.tsx b/apps/dashboard/src/@/components/chat/Reasoning.tsx similarity index 100% rename from apps/dashboard/src/components/CustomChat/Reasoning.tsx rename to apps/dashboard/src/@/components/chat/Reasoning.tsx diff --git a/apps/dashboard/src/components/CustomChat/types.ts b/apps/dashboard/src/@/components/chat/types.ts similarity index 100% rename from apps/dashboard/src/components/CustomChat/types.ts rename to apps/dashboard/src/@/components/chat/types.ts diff --git a/apps/dashboard/src/components/cmd-k-search/index.tsx b/apps/dashboard/src/@/components/cmd-k-search/index.tsx similarity index 98% rename from apps/dashboard/src/components/cmd-k-search/index.tsx rename to apps/dashboard/src/@/components/cmd-k-search/index.tsx index 373842fb487..bd34cffe33c 100644 --- a/apps/dashboard/src/components/cmd-k-search/index.tsx +++ b/apps/dashboard/src/@/components/cmd-k-search/index.tsx @@ -7,14 +7,11 @@ import { useQuery, useQueryClient, } from "@tanstack/react-query"; -import { ChainIconClient } from "components/icons/ChainIcon"; -import { fetchTopContracts, type TrendingContract } from "lib/search"; import { ArrowRightIcon, CommandIcon, SearchIcon, XIcon } from "lucide-react"; import Link from "next/link"; import { useCallback, useEffect, useMemo, useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import { useDebounce } from "use-debounce"; -import { shortenIfAddress } from "utils/usedapp-external"; import { Button } from "@/components/ui/button"; import { DynamicHeight } from "@/components/ui/DynamicHeight"; import { @@ -27,8 +24,11 @@ import { import { Input } from "@/components/ui/input"; import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { ChainIconClient } from "@/icons/ChainIcon"; import { useDashboardRouter } from "@/lib/DashboardRouter"; +import { fetchTopContracts, type TrendingContract } from "@/lib/search"; import { cn } from "@/lib/utils"; +import { shortenIfAddress } from "@/utils/usedapp-external"; const typesenseApiKey = process.env.NEXT_PUBLIC_TYPESENSE_CONTRACT_API_KEY || ""; diff --git a/apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx b/apps/dashboard/src/@/components/connect-wallet/index.tsx similarity index 92% rename from apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx rename to apps/dashboard/src/@/components/connect-wallet/index.tsx index 0f5f8fa344e..b1246e03732 100644 --- a/apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx +++ b/apps/dashboard/src/@/components/connect-wallet/index.tsx @@ -1,10 +1,7 @@ "use client"; -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 { useAllChainsData } from "hooks/chains/allChains"; +import { useFavoriteChainIds } from "@app/(dashboard)/(chain)/components/client/star-button"; +import { doLogout } from "@app/login/auth-actions"; import Image from "next/image"; import Link from "next/link"; import { usePathname } from "next/navigation"; @@ -18,16 +15,19 @@ import { useConnectModal, } from "thirdweb/react"; import { resetAnalytics } from "@/analytics/reset"; +import { CustomChainRenderer } from "@/components/misc/CustomChainRenderer"; +import { LazyConfigureNetworkModal } from "@/components/misc/configure-networks/LazyConfigureNetworkModal"; import { Button } from "@/components/ui/button"; +import { popularChains } from "@/constants/popularChains"; +import { useAllChainsData } from "@/hooks/chains/allChains"; import { useStore } from "@/lib/reactive"; -import { useFavoriteChainIds } from "../../../../app/(app)/(dashboard)/(chain)/components/client/star-button"; -import { doLogout } from "../../../../app/(app)/login/auth-actions"; import { addRecentlyUsedChainId, recentlyUsedChainIdsStore, type StoredChain, -} from "../../../../stores/chainStores"; -import { popularChains } from "../popularChains"; +} from "@/stores/chainStores"; +import { mapV4ChainToV5Chain } from "@/utils/map-chains"; +import { getSDKTheme } from "@/utils/sdk-component-theme"; export const CustomConnectWallet = (props: { loginRequired?: boolean; diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/add-to-project-card.stories.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/add-to-project-card.stories.tsx similarity index 96% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/add-to-project-card.stories.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/add-to-project-card.stories.tsx index 4aae973300f..ce54d9ff173 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/add-to-project-card.stories.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/add-to-project-card.stories.tsx @@ -1,9 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useState } from "react"; -import { - BadgeContainer, - storybookThirdwebClient, -} from "../../../stories/utils"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { AddToProjectCardUI, type MinimalProject, diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/add-to-project-card.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/add-to-project-card.tsx similarity index 97% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/add-to-project-card.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/add-to-project-card.tsx index 4deb988c4be..ae07ba5a83a 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/add-to-project-card.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/add-to-project-card.tsx @@ -5,8 +5,8 @@ import { useId } from "react"; import type { ThirdwebClient } from "thirdweb"; import type { Project } from "@/api/projects"; import type { Team } from "@/api/team"; -import { GradientAvatar } from "@/components/blocks/Avatars/GradientAvatar"; -import { ProjectAvatar } from "@/components/blocks/Avatars/ProjectAvatar"; +import { GradientAvatar } from "@/components/blocks/avatar/gradient-avatar"; +import { ProjectAvatar } from "@/components/blocks/avatar/project-avatar"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Checkbox } from "@/components/ui/checkbox"; import { Label } from "@/components/ui/label"; diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/common.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/common.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/common.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/common.tsx diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/contract-metadata-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/contract-metadata-fieldset.tsx similarity index 98% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/contract-metadata-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/contract-metadata-fieldset.tsx index 82c8f651fb1..4edee07d133 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/contract-metadata-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/contract-metadata-fieldset.tsx @@ -1,6 +1,6 @@ -import { FileInput } from "components/shared/FileInput"; import { useId } from "react"; import type { ThirdwebClient } from "thirdweb"; +import { FileInput } from "@/components/blocks/FileInput"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/custom-contract.tsx similarity index 97% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/custom-contract.tsx index 337659c6f6c..d2327140858 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/custom-contract.tsx @@ -2,17 +2,8 @@ import { Flex, FormControl } from "@chakra-ui/react"; import { useMutation, useQuery } from "@tanstack/react-query"; import { verifyContract } from "app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/sources/ContractSourcesPage"; -import { NetworkSelectorButton } from "components/selects/NetworkSelectorButton"; -import { - DEFAULT_FEE_BPS, - DEFAULT_FEE_BPS_NEW, - DEFAULT_FEE_RECIPIENT, - THIRDWEB_PUBLISHER_ADDRESS, -} from "constants/addresses"; -import { ZERO_FEE_CHAINS } from "constants/fee-config"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; -import { useTxNotifications } from "hooks/useTxNotifications"; -import { replaceTemplateValues } from "lib/deployment/template-values"; +import { FormHelperText, FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { ArrowUpFromLineIcon, CircleAlertIcon, @@ -32,11 +23,12 @@ import { import { useActiveAccount, useActiveWalletChain } from "thirdweb/react"; import { upload } from "thirdweb/storage"; import { isZkSyncChain } from "thirdweb/utils"; -import { FormHelperText, FormLabel, Text } from "tw-components"; import { reportContractDeployed, reportContractDeployFailed, } from "@/analytics/report"; +import { NetworkSelectorButton } from "@/components/misc/NetworkSelectorButton"; +import { SolidityInput } from "@/components/solidity-inputs"; import { Accordion, AccordionContent, @@ -47,14 +39,23 @@ import { Alert, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Checkbox, CheckboxWithLabel } from "@/components/ui/checkbox"; import { ToolTipLabel } from "@/components/ui/tooltip"; -import { useAddContractToProject } from "../../../app/(app)/team/[team_slug]/[project_slug]/(sidebar)/hooks/project-contracts"; import { - LAST_USED_PROJECT_ID, - LAST_USED_TEAM_ID, -} from "../../../constants/cookies"; -import { getCookie } from "../../../lib/cookie"; -import { parseError } from "../../../utils/errorParser"; -import { useCustomFactoryAbi, useFunctionParamsFromABI } from "../hooks"; + DEFAULT_FEE_BPS, + DEFAULT_FEE_BPS_NEW, + DEFAULT_FEE_RECIPIENT, + THIRDWEB_PUBLISHER_ADDRESS, +} from "@/constants/addresses"; +import { LAST_USED_PROJECT_ID, LAST_USED_TEAM_ID } from "@/constants/cookies"; +import { ZERO_FEE_CHAINS } from "@/constants/fee-config"; +import { + useCustomFactoryAbi, + useFunctionParamsFromABI, +} from "@/hooks/contract-hooks"; +import { useAddContractToProject } from "@/hooks/project-contracts"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { replaceTemplateValues } from "@/lib/deployment/template-values"; +import { getCookie } from "@/utils/cookie"; +import { parseError } from "@/utils/errorParser"; import { AddToProjectCardUI, type MinimalProject, diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/deploy-context-modal.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/deploy-context-modal.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/deploy-context-modal.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/deploy-context-modal.tsx diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/modular-contract-default-modules-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/modular-contract-default-modules-fieldset.tsx similarity index 98% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/modular-contract-default-modules-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/modular-contract-default-modules-fieldset.tsx index ae1a855842a..001190074a8 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/modular-contract-default-modules-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/modular-contract-default-modules-fieldset.tsx @@ -1,9 +1,9 @@ import { FormControl } from "@chakra-ui/react"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; +import { FormErrorMessage, FormLabel } from "chakra/form"; import { useMemo } from "react"; import type { ThirdwebClient } from "thirdweb"; import type { FetchDeployMetadataResult } from "thirdweb/contract"; -import { FormErrorMessage, FormLabel } from "tw-components"; +import { SolidityInput } from "@/components/solidity-inputs"; import type { CustomContractDeploymentForm } from "./custom-contract"; import { PrimarySaleFieldset } from "./primary-sale-fieldset"; import { RoyaltyFieldset } from "./royalty-fieldset"; diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/param.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/param.tsx similarity index 91% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/param.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/param.tsx index c5f06d7a54e..380f496a998 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/param.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/param.tsx @@ -1,8 +1,8 @@ -import { SolidityInput } from "contract-ui/components/solidity-inputs"; -import { camelToTitle } from "contract-ui/components/solidity-inputs/helpers"; import { useFormContext } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; +import { SolidityInput } from "@/components/solidity-inputs"; +import { camelToTitle } from "@/components/solidity-inputs/helpers"; interface ParamProps { paramKey: string; diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/platform-fee-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/platform-fee-fieldset.tsx similarity index 96% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/platform-fee-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/platform-fee-fieldset.tsx index 574d3cd5abb..676450aaff8 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/platform-fee-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/platform-fee-fieldset.tsx @@ -1,8 +1,8 @@ -import { BasisPointsInput } from "components/inputs/BasisPointsInput"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; import Link from "next/link"; import type { ThirdwebClient } from "thirdweb"; +import { BasisPointsInput } from "@/components/blocks/BasisPointsInput"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; +import { SolidityInput } from "@/components/solidity-inputs"; import { Fieldset } from "./common"; import type { CustomContractDeploymentForm } from "./custom-contract"; diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/primary-sale-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/primary-sale-fieldset.tsx similarity index 93% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/primary-sale-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/primary-sale-fieldset.tsx index d1902ffd310..3b1bf4179b6 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/primary-sale-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/primary-sale-fieldset.tsx @@ -1,7 +1,7 @@ -import { SolidityInput } from "contract-ui/components/solidity-inputs"; import type { UseFormRegisterReturn } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; +import { SolidityInput } from "@/components/solidity-inputs"; import { Fieldset } from "./common"; interface PrimarySaleFieldsetProps { diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/royalty-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/royalty-fieldset.tsx similarity index 94% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/royalty-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/royalty-fieldset.tsx index f39d2dfa758..04419dbf228 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/royalty-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/royalty-fieldset.tsx @@ -1,8 +1,8 @@ -import { BasisPointsInput } from "components/inputs/BasisPointsInput"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; import type { UseFormRegisterReturn } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; +import { BasisPointsInput } from "@/components/blocks/BasisPointsInput"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; +import { SolidityInput } from "@/components/solidity-inputs"; import { Fieldset } from "./common"; export function RoyaltyFieldset(props: { diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/sequential-token-id-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/sequential-token-id-fieldset.tsx similarity index 92% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/sequential-token-id-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/sequential-token-id-fieldset.tsx index c588ad0fec1..80f84ec28d0 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/sequential-token-id-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/sequential-token-id-fieldset.tsx @@ -1,7 +1,7 @@ -import { SolidityInput } from "contract-ui/components/solidity-inputs"; import type { UseFormRegisterReturn } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; +import { SolidityInput } from "@/components/solidity-inputs"; import { FormControl } from "@/components/ui/form"; interface SequentialTokenIdFieldsetProps { diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/split-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/split-fieldset.tsx similarity index 96% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/split-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/split-fieldset.tsx index 980a415640f..0f9c9073290 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/split-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/split-fieldset.tsx @@ -1,9 +1,9 @@ -import { BasisPointsInput } from "components/inputs/BasisPointsInput"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; import { InfoIcon, PlusIcon, Trash2Icon } from "lucide-react"; import { useFieldArray } from "react-hook-form"; import { type ThirdwebClient, ZERO_ADDRESS } from "thirdweb"; +import { BasisPointsInput } from "@/components/blocks/BasisPointsInput"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; +import { SolidityInput } from "@/components/solidity-inputs"; import { Alert, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Fieldset } from "./common"; diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/trusted-forwarders-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/trusted-forwarders-fieldset.tsx similarity index 96% rename from apps/dashboard/src/components/contract-components/contract-deploy-form/trusted-forwarders-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-deploy-form/trusted-forwarders-fieldset.tsx index aa190d39ec2..6d326ce8a38 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/trusted-forwarders-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/trusted-forwarders-fieldset.tsx @@ -1,6 +1,6 @@ -import { SolidityInput } from "contract-ui/components/solidity-inputs"; import type { ThirdwebClient } from "thirdweb"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; +import { SolidityInput } from "@/components/solidity-inputs"; import { Fieldset } from "./common"; import type { CustomContractDeploymentForm, diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/abi-selector.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/abi-selector.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/contract-publish-form/abi-selector.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/abi-selector.tsx diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/contract-params-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/contract-params-fieldset.tsx similarity index 98% rename from apps/dashboard/src/components/contract-components/contract-publish-form/contract-params-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/contract-params-fieldset.tsx index 29c187c0f6a..8b9204f8887 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/contract-params-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/contract-params-fieldset.tsx @@ -1,18 +1,18 @@ import { FormControl, useBreakpointValue } from "@chakra-ui/react"; import type { AbiParameter } from "abitype"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; -import { camelToTitle } from "contract-ui/components/solidity-inputs/helpers"; -import { getTemplateValuesForType } from "lib/deployment/template-values"; import { useId, useState } from "react"; import { useFormContext } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; +import { SolidityInput } from "@/components/solidity-inputs"; +import { camelToTitle } from "@/components/solidity-inputs/helpers"; import { Checkbox, CheckboxWithLabel } from "@/components/ui/checkbox"; import { InlineCode } from "@/components/ui/inline-code"; import { Input } from "@/components/ui/input"; import { Separator } from "@/components/ui/separator"; import { Switch } from "@/components/ui/switch"; import { Textarea } from "@/components/ui/textarea"; +import { getTemplateValuesForType } from "@/lib/deployment/template-values"; import { DecodedInputArrayFieldset } from "./decoded-bytes-input/decoded-input-array-fieldset"; import { RefInputFieldset } from "./ref-contract-input/ref-input-fieldset"; diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/custom-factory.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/custom-factory.tsx similarity index 96% rename from apps/dashboard/src/components/contract-components/contract-publish-form/custom-factory.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/custom-factory.tsx index 3c7fe4aaa61..8a3a6852f69 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/custom-factory.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/custom-factory.tsx @@ -8,13 +8,15 @@ import { UnorderedList, } from "@chakra-ui/react"; import type { Abi } from "abitype"; +import { Button } from "chakra/button"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { PlusIcon, TrashIcon } from "lucide-react"; import { type Dispatch, type SetStateAction, useEffect } from "react"; import { Controller, useFieldArray, useFormContext } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; -import { Button, Heading, Text } from "tw-components"; import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors"; -import { useCustomFactoryAbi } from "../hooks"; +import { useCustomFactoryAbi } from "@/hooks/contract-hooks"; import { AbiSelector } from "./abi-selector"; interface CustomFactoryProps { diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-array-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-array-fieldset.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-array-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-array-fieldset.tsx diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-set.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-set.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-set.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-set.tsx diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input.tsx diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input-fieldset.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input-fieldset.tsx diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input.tsx similarity index 98% rename from apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input.tsx index a5ba65d3cd3..f6c6bbff17f 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input.tsx @@ -13,8 +13,11 @@ import { SelectValue, } from "@/components/ui/select"; import { SkeletonContainer } from "@/components/ui/skeleton"; +import { + useAllVersions, + usePublishedContractsQuery, +} from "@/hooks/contract-hooks"; import { cn } from "@/lib/utils"; -import { useAllVersions, usePublishedContractsQuery } from "../../hooks"; interface RefBytesContractInputProps { param: AbiParameter; diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/default-factory.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/default-factory.tsx similarity index 95% rename from apps/dashboard/src/components/contract-components/contract-publish-form/default-factory.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/default-factory.tsx index 9de39df1c2f..5280c8c8f7f 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/default-factory.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/default-factory.tsx @@ -1,8 +1,10 @@ import { Flex, FormControl, ListItem, UnorderedList } from "@chakra-ui/react"; import type { Abi } from "abitype"; +import { Heading } from "chakra/heading"; +import { Link } from "chakra/link"; +import { Text } from "chakra/text"; import { useFormContext } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; -import { Heading, Link, Text } from "tw-components"; import { AbiSelector } from "./abi-selector"; import { NetworksFieldset } from "./networks-fieldset"; diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/external-links-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/external-links-fieldset.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/contract-publish-form/external-links-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/external-links-fieldset.tsx diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/external-links-input.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/external-links-input.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/contract-publish-form/external-links-input.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/external-links-input.tsx diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/factory-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/factory-fieldset.tsx similarity index 96% rename from apps/dashboard/src/components/contract-components/contract-publish-form/factory-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/factory-fieldset.tsx index dde9caaf7c3..33a040c06f0 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/factory-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/factory-fieldset.tsx @@ -1,9 +1,10 @@ import { ButtonGroup, Flex } from "@chakra-ui/react"; import type { Abi } from "abitype"; +import { Button } from "chakra/button"; +import { Heading } from "chakra/heading"; import type { Dispatch, SetStateAction } from "react"; import { useFormContext } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; -import { Button, Heading } from "tw-components"; import { CustomFactory } from "./custom-factory"; import { DefaultFactory } from "./default-factory"; diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/impl-params-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/impl-params-fieldset.tsx similarity index 97% rename from apps/dashboard/src/components/contract-components/contract-publish-form/impl-params-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/impl-params-fieldset.tsx index 6c8a8b345ec..743bd80cd1d 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/impl-params-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/impl-params-fieldset.tsx @@ -1,13 +1,13 @@ import { FormControl, useBreakpointValue } from "@chakra-ui/react"; import type { AbiParameter } from "abitype"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; -import { getTemplateValuesForType } from "lib/deployment/template-values"; import { useState } from "react"; import { useFormContext } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; +import { SolidityInput } from "@/components/solidity-inputs"; import { Checkbox, CheckboxWithLabel } from "@/components/ui/checkbox"; import { InlineCode } from "@/components/ui/inline-code"; import { Switch } from "@/components/ui/switch"; +import { getTemplateValuesForType } from "@/lib/deployment/template-values"; import { RefInputImplFieldset } from "./ref-contract-impl-input/ref-input-impl-fieldset"; interface ImplementationParamsFieldsetProps { diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/index.tsx similarity index 98% rename from apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/index.tsx index 21d56b35c94..e1fd22191be 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/index.tsx @@ -1,12 +1,8 @@ "use client"; -import { CustomConnectWallet } from "@3rdweb-sdk/react/components/connect-wallet"; import { Box, Divider, Flex, IconButton } from "@chakra-ui/react"; import type { Abi } from "abitype"; -import { - DASHBOARD_ENGINE_RELAYER_URL, - DASHBOARD_FORWARDER_ADDRESS, -} from "constants/misc"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { Text } from "chakra/text"; import { ChevronFirstIcon } from "lucide-react"; import { useId, useMemo, useState } from "react"; import { FormProvider, useForm } from "react-hook-form"; @@ -17,11 +13,16 @@ import { publishContract, } from "thirdweb/extensions/thirdweb"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; -import { Button, Text } from "tw-components"; import { reportContractPublished } from "@/analytics/report"; +import { CustomConnectWallet } from "@/components/connect-wallet"; +import { + DASHBOARD_ENGINE_RELAYER_URL, + DASHBOARD_FORWARDER_ADDRESS, +} from "@/constants/misc"; +import { useEns, useFunctionParamsFromABI } from "@/hooks/contract-hooks"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import { useIsomorphicLayoutEffect } from "@/lib/useIsomorphicLayoutEffect"; -import { useEns, useFunctionParamsFromABI } from "../hooks"; import { ContractParamsFieldset } from "./contract-params-fieldset"; import { FactoryFieldset } from "./factory-fieldset"; import { ImplementationParamsFieldset } from "./impl-params-fieldset"; diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/landing-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/landing-fieldset.tsx similarity index 95% rename from apps/dashboard/src/components/contract-components/contract-publish-form/landing-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/landing-fieldset.tsx index 18737fe11b4..37e735f620e 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/landing-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/landing-fieldset.tsx @@ -10,23 +10,19 @@ import { Tabs, Textarea, } from "@chakra-ui/react"; +import { Card } from "chakra/card"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; +import { Link } from "chakra/link"; +import { Text } from "chakra/text"; import { compare, validate } from "compare-versions"; -import { FileInput } from "components/shared/FileInput"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; -import { SelectOption } from "core-ui/batch-upload/lazy-mint-form/select-option"; import { useFormContext } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; import type { ExtendedMetadata } from "thirdweb/utils"; -import { - Card, - FormErrorMessage, - FormHelperText, - FormLabel, - Heading, - Link, - Text, -} from "tw-components"; -import { MarkdownRenderer } from "../published-contract/markdown-renderer"; +import { SelectOption } from "@/components/batch-upload/lazy-mint-form/select-option"; +import { FileInput } from "@/components/blocks/FileInput"; +import { SolidityInput } from "@/components/solidity-inputs"; +import { MarkdownRenderer } from "../../blocks/markdown-renderer"; import { ExternalLinksFieldset } from "./external-links-fieldset"; interface LandingFieldsetProps { diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/networks-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/networks-fieldset.tsx similarity index 96% rename from apps/dashboard/src/components/contract-components/contract-publish-form/networks-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/networks-fieldset.tsx index ef8d94916b7..3d709702c70 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/networks-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/networks-fieldset.tsx @@ -1,6 +1,7 @@ +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { useFormContext } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; -import { Heading, Text } from "tw-components"; import { MultiNetworkSelector } from "@/components/blocks/NetworkSelectors"; import { Select, diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl-fieldset.tsx similarity index 97% rename from apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl-fieldset.tsx index 9ff2fe1894d..6f96e60ea27 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl-fieldset.tsx @@ -1,8 +1,8 @@ import type { AbiParameter } from "abitype"; +import { Button } from "chakra/button"; import { PlusIcon } from "lucide-react"; import { useFieldArray, useFormContext } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; -import { Button } from "tw-components"; import { cn } from "@/lib/utils"; import { RefContractImplInput } from "./ref-input-impl"; diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl.tsx similarity index 98% rename from apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl.tsx index d0f06cd2512..c4c2672b758 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl.tsx @@ -13,8 +13,11 @@ import { SelectValue, } from "@/components/ui/select"; import { SkeletonContainer } from "@/components/ui/skeleton"; +import { + useAllVersions, + usePublishedContractsQuery, +} from "@/hooks/contract-hooks"; import { cn } from "@/lib/utils"; -import { useAllVersions, usePublishedContractsQuery } from "../../hooks"; interface RefContractImplInputProps { param: AbiParameter; diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/ref-input-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/ref-contract-input/ref-input-fieldset.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/ref-input-fieldset.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/ref-contract-input/ref-input-fieldset.tsx diff --git a/apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/ref-input.tsx b/apps/dashboard/src/@/components/contract-components/contract-publish-form/ref-contract-input/ref-input.tsx similarity index 98% rename from apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/ref-input.tsx rename to apps/dashboard/src/@/components/contract-components/contract-publish-form/ref-contract-input/ref-input.tsx index 9b11f975c75..11932a189ea 100644 --- a/apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/ref-input.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-publish-form/ref-contract-input/ref-input.tsx @@ -13,8 +13,11 @@ import { SelectValue, } from "@/components/ui/select"; import { SkeletonContainer } from "@/components/ui/skeleton"; +import { + useAllVersions, + usePublishedContractsQuery, +} from "@/hooks/contract-hooks"; import { cn } from "@/lib/utils"; -import { useAllVersions, usePublishedContractsQuery } from "../../hooks"; interface RefContractInputProps { param: AbiParameter; diff --git a/apps/dashboard/src/components/contract-components/fetch-contracts-with-versions.ts b/apps/dashboard/src/@/components/contract-components/fetch-contracts-with-versions.ts similarity index 100% rename from apps/dashboard/src/components/contract-components/fetch-contracts-with-versions.ts rename to apps/dashboard/src/@/components/contract-components/fetch-contracts-with-versions.ts diff --git a/apps/dashboard/src/components/contract-components/fetchDeployMetadata.ts b/apps/dashboard/src/@/components/contract-components/fetchDeployMetadata.ts similarity index 91% rename from apps/dashboard/src/components/contract-components/fetchDeployMetadata.ts rename to apps/dashboard/src/@/components/contract-components/fetchDeployMetadata.ts index a31f3136b69..09bddb56bf1 100644 --- a/apps/dashboard/src/components/contract-components/fetchDeployMetadata.ts +++ b/apps/dashboard/src/@/components/contract-components/fetchDeployMetadata.ts @@ -1,6 +1,6 @@ import type { ThirdwebClient } from "thirdweb"; import { fetchDeployMetadata as sdkFetchDeployMetadata } from "thirdweb/contract"; -import { removeUndefinedFromObjectDeep } from "../../utils/object"; +import { removeUndefinedFromObjectDeep } from "@/utils/object"; import type { ContractId } from "./types"; // metadata PRE publish, only has the compiler output info (from CLI) diff --git a/apps/dashboard/src/components/contract-components/fetchPublishedContracts.ts b/apps/dashboard/src/@/components/contract-components/fetchPublishedContracts.ts similarity index 96% rename from apps/dashboard/src/components/contract-components/fetchPublishedContracts.ts rename to apps/dashboard/src/@/components/contract-components/fetchPublishedContracts.ts index 60b0f8e5155..72049375043 100644 --- a/apps/dashboard/src/components/contract-components/fetchPublishedContracts.ts +++ b/apps/dashboard/src/@/components/contract-components/fetchPublishedContracts.ts @@ -1,9 +1,9 @@ -import { resolveEns } from "lib/ens"; import type { ThirdwebClient } from "thirdweb"; import { getAllPublishedContracts, getContractPublisher, } from "thirdweb/extensions/thirdweb"; +import { resolveEns } from "@/lib/ens"; import { fetchDeployMetadata } from "./fetchDeployMetadata"; // TODO: clean this up, jesus diff --git a/apps/dashboard/src/components/contract-components/fetchPublishedContractsFromDeploy.ts b/apps/dashboard/src/@/components/contract-components/fetchPublishedContractsFromDeploy.ts similarity index 96% rename from apps/dashboard/src/components/contract-components/fetchPublishedContractsFromDeploy.ts rename to apps/dashboard/src/@/components/contract-components/fetchPublishedContractsFromDeploy.ts index ec7cc48fa7e..562380b17f6 100644 --- a/apps/dashboard/src/components/contract-components/fetchPublishedContractsFromDeploy.ts +++ b/apps/dashboard/src/@/components/contract-components/fetchPublishedContractsFromDeploy.ts @@ -1,4 +1,3 @@ -import { THIRDWEB_DEPLOYER_ADDRESS } from "constants/addresses"; import type { ThirdwebContract } from "thirdweb"; import { fetchPublishedContract } from "thirdweb/contract"; import { @@ -11,6 +10,7 @@ import { isZkSyncChain, resolveImplementation, } from "thirdweb/utils"; +import { THIRDWEB_DEPLOYER_ADDRESS } from "@/constants/addresses"; import { fetchDeployMetadata } from "./fetchDeployMetadata"; type ZkSolcMetadata = { diff --git a/apps/dashboard/src/components/contract-components/getContractFunctionsFromAbi.ts b/apps/dashboard/src/@/components/contract-components/getContractFunctionsFromAbi.ts similarity index 100% rename from apps/dashboard/src/components/contract-components/getContractFunctionsFromAbi.ts rename to apps/dashboard/src/@/components/contract-components/getContractFunctionsFromAbi.ts diff --git a/apps/dashboard/src/components/contract-components/publisher/publisher-header.tsx b/apps/dashboard/src/@/components/contract-components/publisher/publisher-header.tsx similarity index 93% rename from apps/dashboard/src/components/contract-components/publisher/publisher-header.tsx rename to apps/dashboard/src/@/components/contract-components/publisher/publisher-header.tsx index cf7c95b4946..395b0adaead 100644 --- a/apps/dashboard/src/components/contract-components/publisher/publisher-header.tsx +++ b/apps/dashboard/src/@/components/contract-components/publisher/publisher-header.tsx @@ -1,6 +1,5 @@ "use client"; -import { replaceDeployerAddress } from "lib/publisher-utils"; import Link from "next/link"; import { type ThirdwebClient, ZERO_ADDRESS } from "thirdweb"; import { @@ -10,10 +9,11 @@ import { AccountName, AccountProvider, } from "thirdweb/react"; -import { shortenIfAddress } from "utils/usedapp-external"; import { Button } from "@/components/ui/button"; import { Skeleton } from "@/components/ui/skeleton"; -import { useEns } from "../hooks"; +import { useEns } from "@/hooks/contract-hooks"; +import { replaceDeployerAddress } from "@/lib/publisher-utils"; +import { shortenIfAddress } from "@/utils/usedapp-external"; interface PublisherHeaderProps { wallet: string; 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 similarity index 88% rename from apps/dashboard/src/components/contract-components/shared/contract-id-image.tsx rename to apps/dashboard/src/@/components/contract-components/shared/contract-id-image.tsx index abcce56f22a..5d5dc08e15e 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,11 @@ /* 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 { serverThirdwebClient } from "@/constants/thirdweb-client.server"; -import generalContractIcon from "../../../../public/assets/tw-icons/general.png"; +import { replaceIpfsUrl } from "@/lib/sdk"; +import generalContractIcon from "../../../../../public/assets/tw-icons/general.png"; type ContractIdImageProps = { deployedMetadataResult: FetchDeployMetadataResult; diff --git a/apps/dashboard/src/components/contract-components/shared/sources-accordion.tsx b/apps/dashboard/src/@/components/contract-components/shared/sources-accordion.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/shared/sources-accordion.tsx rename to apps/dashboard/src/@/components/contract-components/shared/sources-accordion.tsx diff --git a/apps/dashboard/src/components/contract-components/shared/sources-panel.tsx b/apps/dashboard/src/@/components/contract-components/shared/sources-panel.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/shared/sources-panel.tsx rename to apps/dashboard/src/@/components/contract-components/shared/sources-panel.tsx diff --git a/apps/dashboard/src/components/selects/NetworkSelectDropdown.tsx b/apps/dashboard/src/@/components/contract-components/tables/NetworkSelectDropdown.tsx similarity index 96% rename from apps/dashboard/src/components/selects/NetworkSelectDropdown.tsx rename to apps/dashboard/src/@/components/contract-components/tables/NetworkSelectDropdown.tsx index 222c8e7ccb7..59f1ab30d56 100644 --- a/apps/dashboard/src/components/selects/NetworkSelectDropdown.tsx +++ b/apps/dashboard/src/@/components/contract-components/tables/NetworkSelectDropdown.tsx @@ -1,5 +1,3 @@ -import { ChainIconClient } from "components/icons/ChainIcon"; -import { useAllChainsData } from "hooks/chains/allChains"; import { useMemo } from "react"; import type { ThirdwebClient } from "thirdweb"; import { @@ -9,6 +7,8 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { ChainIconClient } from "@/icons/ChainIcon"; interface NetworkSelectDropdownProps { enabledChainIds?: number[]; diff --git a/apps/dashboard/src/components/contract-components/tables/cells.tsx b/apps/dashboard/src/@/components/contract-components/tables/cells.tsx similarity index 88% rename from apps/dashboard/src/components/contract-components/tables/cells.tsx rename to apps/dashboard/src/@/components/contract-components/tables/cells.tsx index a3ba3ed702a..4a1a396d1bf 100644 --- a/apps/dashboard/src/components/contract-components/tables/cells.tsx +++ b/apps/dashboard/src/@/components/contract-components/tables/cells.tsx @@ -1,17 +1,17 @@ "use client"; -import { useDashboardContractMetadata } from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata"; -import { useChainSlug } from "hooks/chains/chainSlug"; -import { useV5DashboardChain } from "lib/v5-adapter"; import Link from "next/link"; import { memo } from "react"; import { getContract, type ThirdwebClient } from "thirdweb"; -import { shortenIfAddress } from "utils/usedapp-external"; import { Badge } from "@/components/ui/badge"; import { SkeletonContainer } from "@/components/ui/skeleton"; +import { THIRDWEB_DEPLOYER_ADDRESS } from "@/constants/addresses"; +import { useChainSlug } from "@/hooks/chains/chainSlug"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; +import { usePublishedContractsFromDeploy } from "@/hooks/contract-hooks"; +import { useDashboardContractMetadata } from "@/hooks/useDashboardContractMetadata"; import { cn } from "@/lib/utils"; -import { THIRDWEB_DEPLOYER_ADDRESS } from "../../../constants/addresses"; -import { usePublishedContractsFromDeploy } from "../hooks"; +import { shortenIfAddress } from "@/utils/usedapp-external"; export const ContractNameCell = memo(function ContractNameCell(props: { chainId: string; diff --git a/apps/dashboard/src/components/contract-components/tables/contract-table.stories.tsx b/apps/dashboard/src/@/components/contract-components/tables/contract-table.stories.tsx similarity index 95% rename from apps/dashboard/src/components/contract-components/tables/contract-table.stories.tsx rename to apps/dashboard/src/@/components/contract-components/tables/contract-table.stories.tsx index 25cef5fd166..e4b6dbb95ee 100644 --- a/apps/dashboard/src/components/contract-components/tables/contract-table.stories.tsx +++ b/apps/dashboard/src/@/components/contract-components/tables/contract-table.stories.tsx @@ -1,10 +1,7 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { ThirdwebProvider } from "thirdweb/react"; -import type { ProjectContract } from "../../../app/(app)/account/contracts/_components/getProjectContracts"; -import { - BadgeContainer, - storybookThirdwebClient, -} from "../../../stories/utils"; +import type { ProjectContract } from "@/api/getProjectContracts"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { ContractTableUI } from "./contract-table"; const meta = { diff --git a/apps/dashboard/src/components/contract-components/tables/contract-table.tsx b/apps/dashboard/src/@/components/contract-components/tables/contract-table.tsx similarity index 96% rename from apps/dashboard/src/components/contract-components/tables/contract-table.tsx rename to apps/dashboard/src/@/components/contract-components/tables/contract-table.tsx index 5e7abbcae8d..27ba135d3fd 100644 --- a/apps/dashboard/src/components/contract-components/tables/contract-table.tsx +++ b/apps/dashboard/src/@/components/contract-components/tables/contract-table.tsx @@ -1,15 +1,14 @@ "use client"; 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 React, { useCallback, useEffect, useMemo, useState } from "react"; import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; -import { PaginationButtons } from "@/components/pagination-buttons"; +import type { ProjectContract } from "@/api/getProjectContracts"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; +import { NetworkSelectDropdown } from "@/components/contract-components/tables/NetworkSelectDropdown"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; @@ -29,9 +28,10 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { removeContractFromProject } from "@/hooks/project-contracts"; +import { ChainIconClient } from "@/icons/ChainIcon"; 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 { ContractNameCell, ContractTypeCell, diff --git a/apps/dashboard/src/components/contract-components/tables/show-more-button.tsx b/apps/dashboard/src/@/components/contract-components/tables/show-more-button.tsx similarity index 100% rename from apps/dashboard/src/components/contract-components/tables/show-more-button.tsx rename to apps/dashboard/src/@/components/contract-components/tables/show-more-button.tsx diff --git a/apps/dashboard/src/components/contract-components/types.ts b/apps/dashboard/src/@/components/contract-components/types.ts similarity index 69% rename from apps/dashboard/src/components/contract-components/types.ts rename to apps/dashboard/src/@/components/contract-components/types.ts index 896e77ef267..1f97aaff9dc 100644 --- a/apps/dashboard/src/components/contract-components/types.ts +++ b/apps/dashboard/src/@/components/contract-components/types.ts @@ -1,4 +1,4 @@ -import type { ContractType } from "constants/contracts"; +import type { ContractType } from "@/types/contracts"; export type ContractId = ContractType | string; diff --git a/apps/dashboard/src/contract-ui/tabs/code/components/code-overview.tsx b/apps/dashboard/src/@/components/contracts/code-overview.tsx similarity index 98% rename from apps/dashboard/src/contract-ui/tabs/code/components/code-overview.tsx rename to apps/dashboard/src/@/components/contracts/code-overview.tsx index da17c13ef18..a79178d8d0e 100644 --- a/apps/dashboard/src/contract-ui/tabs/code/components/code-overview.tsx +++ b/apps/dashboard/src/@/components/contracts/code-overview.tsx @@ -22,9 +22,11 @@ import { type AbiFunction, formatAbiItem, } from "abitype"; -import { getContractFunctionsFromAbi } from "components/contract-components/getContractFunctionsFromAbi"; -import { useContractEvents } from "components/contract-components/hooks"; -import { useAllChainsData } from "hooks/chains/allChains"; +import { Button } from "chakra/button"; +import { Card } from "chakra/card"; +import { Heading } from "chakra/heading"; +import { Link } from "chakra/link"; +import { Text } from "chakra/text"; import { useSearchParams } from "next/navigation"; import { useMemo, useState } from "react"; import * as ERC20Ext from "thirdweb/extensions/erc20"; @@ -33,12 +35,15 @@ import * as ERC1155Ext from "thirdweb/extensions/erc1155"; import * as ERC4337Ext from "thirdweb/extensions/erc4337"; import { useActiveAccount } from "thirdweb/react"; import { toFunctionSelector } from "thirdweb/utils"; -import { Button, Card, Heading, Link, Text } from "tw-components"; + import { type CodeEnvironment, CodeSegment, -} from "@/components/blocks/code-segment.client"; +} from "@/components/blocks/code/code-segment.client"; +import { getContractFunctionsFromAbi } from "@/components/contract-components/getContractFunctionsFromAbi"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { useContractEvents } from "@/hooks/contract-hooks"; interface CodeOverviewProps { abi?: Abi; diff --git a/apps/dashboard/src/components/explore/contract-card/index.tsx b/apps/dashboard/src/@/components/contracts/contract-card/index.tsx similarity index 94% rename from apps/dashboard/src/components/explore/contract-card/index.tsx rename to apps/dashboard/src/@/components/contracts/contract-card/index.tsx index 79b40caad59..acfecec0f6d 100644 --- a/apps/dashboard/src/components/explore/contract-card/index.tsx +++ b/apps/dashboard/src/@/components/contracts/contract-card/index.tsx @@ -1,17 +1,17 @@ import { moduleToBase64 } from "app/(app)/(dashboard)/published-contract/utils/module-base-64"; -import { replaceDeployerAddress } from "lib/publisher-utils"; import { RocketIcon, ShieldCheckIcon } from "lucide-react"; import Link from "next/link"; import { ClientOnly } from "@/components/blocks/client-only"; +import { fetchPublishedContractVersion } from "@/components/contract-components/fetch-contracts-with-versions"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Skeleton } from "@/components/ui/skeleton"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { replaceDeployerAddress } from "@/lib/publisher-utils"; import { cn } from "@/lib/utils"; -import { fetchPublishedContractVersion } from "../../contract-components/fetch-contracts-with-versions"; -import { ContractPublisher } from "../publisher"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; +import { ContractPublisher } from "../../../../app/(app)/(dashboard)/explore/components/publisher"; interface ContractCardProps { publisher: string; diff --git a/apps/dashboard/src/components/contract-components/contract-table/index.tsx b/apps/dashboard/src/@/components/contracts/contract-table/index.tsx similarity index 93% rename from apps/dashboard/src/components/contract-components/contract-table/index.tsx rename to apps/dashboard/src/@/components/contracts/contract-table/index.tsx index d48430407a5..e9bbae96e7d 100644 --- a/apps/dashboard/src/components/contract-components/contract-table/index.tsx +++ b/apps/dashboard/src/@/components/contracts/contract-table/index.tsx @@ -1,4 +1,6 @@ import Link from "next/link"; +import { fetchDeployMetadata } from "@/components/contract-components/fetchDeployMetadata"; +import { ContractIdImage } from "@/components/contract-components/shared/contract-id-image"; import { Table, TableBody, @@ -9,8 +11,6 @@ import { TableRow, } from "@/components/ui/table"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; -import { fetchDeployMetadata } from "../fetchDeployMetadata"; -import { ContractIdImage } from "../shared/contract-id-image"; type DeployableContractTableProps = { contractIds: string[]; diff --git a/apps/dashboard/src/components/contract-functions/contract-function-comment.tsx b/apps/dashboard/src/@/components/contracts/functions/contract-function-comment.tsx similarity index 89% rename from apps/dashboard/src/components/contract-functions/contract-function-comment.tsx rename to apps/dashboard/src/@/components/contracts/functions/contract-function-comment.tsx index 1286140d15c..8d47f89eae7 100644 --- a/apps/dashboard/src/components/contract-functions/contract-function-comment.tsx +++ b/apps/dashboard/src/@/components/contracts/functions/contract-function-comment.tsx @@ -1,7 +1,7 @@ -import { useContractFunctionComment } from "contract-ui/hooks/useContractFunctionComment"; import type { ThirdwebContract } from "thirdweb"; import { Badge } from "@/components/ui/badge"; import { CodeClient } from "@/components/ui/code/code.client"; +import { useContractFunctionComment } from "@/hooks/contract-ui/useContractFunctionComment"; /** * Take in a contract & function, try to fetch the comment of that function diff --git a/apps/dashboard/src/components/contract-functions/contract-function.tsx b/apps/dashboard/src/@/components/contracts/functions/contract-function.tsx similarity index 97% rename from apps/dashboard/src/components/contract-functions/contract-function.tsx rename to apps/dashboard/src/@/components/contracts/functions/contract-function.tsx index a819c685f53..409cbca40b5 100644 --- a/apps/dashboard/src/components/contract-functions/contract-function.tsx +++ b/apps/dashboard/src/@/components/contracts/functions/contract-function.tsx @@ -21,7 +21,10 @@ import { Tr, } from "@chakra-ui/react"; import type { AbiEvent, AbiFunction } from "abitype"; -import { camelToTitle } from "contract-ui/components/solidity-inputs/helpers"; +import { Button } from "chakra/button"; +import { Card } from "chakra/card"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { SearchIcon } from "lucide-react"; import { usePathname, useSearchParams } from "next/navigation"; import { @@ -37,22 +40,19 @@ import * as ERC721Ext from "thirdweb/extensions/erc721"; import * as ERC1155Ext from "thirdweb/extensions/erc1155"; import { useReadContract } from "thirdweb/react"; import { toFunctionSelector } from "thirdweb/utils"; -import { Button, Card, Heading, Text } from "tw-components"; import { useDebounce } from "use-debounce"; import { type CodeEnvironment, CodeSegment, -} from "@/components/blocks/code-segment.client"; +} from "@/components/blocks/code/code-segment.client"; +import { camelToTitle } from "@/components/solidity-inputs/helpers"; import { Badge } from "@/components/ui/badge"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { Input } from "@/components/ui/input"; +import { useContractFunctionSelectors } from "@/hooks/contract-ui/useContractFunctionSelectors"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import { cn } from "@/lib/utils"; -import { useContractFunctionSelectors } from "../../contract-ui/hooks/useContractFunctionSelectors"; -import { - COMMANDS, - formatSnippet, -} from "../../contract-ui/tabs/code/components/code-overview"; +import { COMMANDS, formatSnippet } from "../code-overview"; import { InteractiveAbiFunction } from "./interactive-abi-function"; const ContractFunctionComment = lazy( diff --git a/apps/dashboard/src/components/contract-functions/contract-functions.tsx b/apps/dashboard/src/@/components/contracts/functions/contract-functions.tsx similarity index 91% rename from apps/dashboard/src/components/contract-functions/contract-functions.tsx rename to apps/dashboard/src/@/components/contracts/functions/contract-functions.tsx index 000e0b7070f..8ff59d87863 100644 --- a/apps/dashboard/src/components/contract-functions/contract-functions.tsx +++ b/apps/dashboard/src/@/components/contracts/functions/contract-functions.tsx @@ -9,11 +9,11 @@ import { Tabs, } from "@chakra-ui/react"; import type { Abi, AbiEvent, AbiFunction } from "abitype"; -import { SourcesPanel } from "components/contract-components/shared/sources-panel"; -import type { SourceFile } from "components/contract-components/types"; -import { CodeOverview } from "contract-ui/tabs/code/components/code-overview"; +import { Heading } from "chakra/heading"; import type { ThirdwebContract } from "thirdweb"; -import { Heading } from "tw-components"; +import { SourcesPanel } from "@/components/contract-components/shared/sources-panel"; +import type { SourceFile } from "@/components/contract-components/types"; +import { CodeOverview } from "@/components/contracts/code-overview"; import { ContractFunctionsPanel } from "./contract-function"; interface ContractFunctionsOverview { diff --git a/apps/dashboard/src/components/contract-functions/interactive-abi-function.tsx b/apps/dashboard/src/@/components/contracts/functions/interactive-abi-function.tsx similarity index 97% rename from apps/dashboard/src/components/contract-functions/interactive-abi-function.tsx rename to apps/dashboard/src/@/components/contracts/functions/interactive-abi-function.tsx index 3ac1dd6d8f3..f3ed55be2bd 100644 --- a/apps/dashboard/src/components/contract-functions/interactive-abi-function.tsx +++ b/apps/dashboard/src/@/components/contracts/functions/interactive-abi-function.tsx @@ -9,10 +9,11 @@ import { } from "@chakra-ui/react"; import { useMutation } from "@tanstack/react-query"; import { type AbiFunction, type AbiParameter, formatAbiItem } from "abitype"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; -import { camelToTitle } from "contract-ui/components/solidity-inputs/helpers"; -import { replaceIpfsUrl } from "lib/sdk"; +import { Button } from "chakra/button"; +import { Card } from "chakra/card"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { ExternalLinkIcon, InfoIcon, PlayIcon } from "lucide-react"; import Link from "next/link"; import { useEffect, useId, useMemo, useState } from "react"; @@ -28,21 +29,16 @@ import { } from "thirdweb"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; import { parseAbiParams, stringify, toFunctionSelector } from "thirdweb/utils"; -import { - Button, - Card, - FormErrorMessage, - FormHelperText, - FormLabel, - Heading, - Text, -} from "tw-components"; +import { SolidityInput } from "@/components/solidity-inputs"; +import { camelToTitle } from "@/components/solidity-inputs/helpers"; +import { TransactionButton } from "@/components/tx-button"; import { Badge } from "@/components/ui/badge"; import { CodeClient } from "@/components/ui/code/code.client"; import { PlainTextCodeBlock } from "@/components/ui/code/plaintext-code"; import { InlineCode } from "@/components/ui/inline-code"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; +import { replaceIpfsUrl } from "@/lib/sdk"; function formatResponseData(data: unknown): { type: "json" | "text"; diff --git a/apps/dashboard/src/components/contract-components/import-contract/modal.tsx b/apps/dashboard/src/@/components/contracts/import-contract/modal.tsx similarity index 97% rename from apps/dashboard/src/components/contract-components/import-contract/modal.tsx rename to apps/dashboard/src/@/components/contracts/import-contract/modal.tsx index 3f68ba246fd..c7389e7c34b 100644 --- a/apps/dashboard/src/components/contract-components/import-contract/modal.tsx +++ b/apps/dashboard/src/@/components/contracts/import-contract/modal.tsx @@ -1,7 +1,6 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; -import { useChainSlug } from "hooks/chains/chainSlug"; import { ArrowDownToLineIcon, ExternalLinkIcon } from "lucide-react"; import Link from "next/link"; import { useForm } from "react-hook-form"; @@ -29,8 +28,9 @@ import { import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { useChainSlug } from "@/hooks/chains/chainSlug"; +import { useAddContractToProject } from "@/hooks/project-contracts"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { useAddContractToProject } from "../../../app/(app)/team/[team_slug]/[project_slug]/(sidebar)/hooks/project-contracts"; type ImportModalProps = { isOpen: boolean; diff --git a/apps/dashboard/src/components/contract-pages/table/table-columns/cells/media-cell.tsx b/apps/dashboard/src/@/components/contracts/media-cell.tsx similarity index 87% rename from apps/dashboard/src/components/contract-pages/table/table-columns/cells/media-cell.tsx rename to apps/dashboard/src/@/components/contracts/media-cell.tsx index c76fd76f827..5c3111daf67 100644 --- a/apps/dashboard/src/components/contract-pages/table/table-columns/cells/media-cell.tsx +++ b/apps/dashboard/src/@/components/contracts/media-cell.tsx @@ -1,6 +1,6 @@ import type { ThirdwebClient } from "thirdweb"; import type { NFTMetadata } from "thirdweb/utils"; -import { NFTMediaWithEmptyState } from "tw-components/nft-media"; +import { NFTMediaWithEmptyState } from "@/components/blocks/nft-media"; interface MediaCellProps { cell: { diff --git a/apps/dashboard/src/components/contract-pages/forms/properties.shared.tsx b/apps/dashboard/src/@/components/contracts/properties.shared.tsx similarity index 97% rename from apps/dashboard/src/components/contract-pages/forms/properties.shared.tsx rename to apps/dashboard/src/@/components/contracts/properties.shared.tsx index f40e3455ece..f2a3bbcd0b4 100644 --- a/apps/dashboard/src/components/contract-pages/forms/properties.shared.tsx +++ b/apps/dashboard/src/@/components/contracts/properties.shared.tsx @@ -7,7 +7,8 @@ import { InputRightElement, Tooltip, } from "@chakra-ui/react"; -import { FileInput } from "components/shared/FileInput"; +import { Button } from "chakra/button"; +import { FormErrorMessage, FormLabel } from "chakra/form"; import { BanIcon, PlusIcon, TrashIcon, UploadIcon, XIcon } from "lucide-react"; import { useEffect } from "react"; import { @@ -24,7 +25,7 @@ import { type WatchObserver, } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; -import { Button, FormErrorMessage, FormLabel } from "tw-components"; +import { FileInput } from "@/components/blocks/FileInput"; type OptionalPropertiesInput = { [key: string]: string | number; diff --git a/apps/dashboard/src/components/contract-components/published-contract/index.tsx b/apps/dashboard/src/@/components/contracts/published-contract/index.tsx similarity index 93% rename from apps/dashboard/src/components/contract-components/published-contract/index.tsx rename to apps/dashboard/src/@/components/contracts/published-contract/index.tsx index f84dc02cadf..378d7f1336a 100644 --- a/apps/dashboard/src/components/contract-components/published-contract/index.tsx +++ b/apps/dashboard/src/@/components/contracts/published-contract/index.tsx @@ -2,10 +2,11 @@ import { Divider, Flex, GridItem, List, ListItem } from "@chakra-ui/react"; import { useQuery } from "@tanstack/react-query"; -import { ContractFunctionsOverview } from "components/contract-functions/contract-functions"; +import { LinkButton } from "chakra/button"; +import { Card } from "chakra/card"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { format } from "date-fns"; -import { correctAndUniqueLicenses } from "lib/licenses"; -import { replaceIpfsUrl } from "lib/sdk"; import { BookOpenTextIcon, CalendarDaysIcon, @@ -20,16 +21,18 @@ import type { ThirdwebClient } from "thirdweb"; import { useActiveAccount } from "thirdweb/react"; import { download } from "thirdweb/storage"; import invariant from "tiny-invariant"; -import { Card, Heading, LinkButton, Text } from "tw-components"; +import { PublisherHeader } from "@/components//contract-components/publisher/publisher-header"; +import { MarkdownRenderer } from "@/components/blocks/markdown-renderer"; +import type { PublishedContractWithVersion } from "@/components/contract-components/fetch-contracts-with-versions"; +import { ContractFunctionsOverview } from "@/components/contracts/functions/contract-functions"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; -import type { PublishedContractWithVersion } from "../fetch-contracts-with-versions"; import { usePublishedContractEvents, usePublishedContractFunctions, -} from "../hooks"; -import { PublisherHeader } from "../publisher/publisher-header"; -import { MarkdownRenderer } from "./markdown-renderer"; +} from "@/hooks/contract-hooks"; +import { correctAndUniqueLicenses } from "@/lib/licenses"; +import { replaceIpfsUrl } from "@/lib/sdk"; interface ExtendedPublishedContract extends PublishedContractWithVersion { name: string; diff --git a/apps/dashboard/src/@3rdweb-sdk/react/components/roles/admin-only.tsx b/apps/dashboard/src/@/components/contracts/roles/admin-only.tsx similarity index 84% rename from apps/dashboard/src/@3rdweb-sdk/react/components/roles/admin-only.tsx rename to apps/dashboard/src/@/components/contracts/roles/admin-only.tsx index 2ba21ac1c62..c15e79f7dd9 100644 --- a/apps/dashboard/src/@3rdweb-sdk/react/components/roles/admin-only.tsx +++ b/apps/dashboard/src/@/components/contracts/roles/admin-only.tsx @@ -1,10 +1,7 @@ -import { - useIsAdmin, - useIsAdminOrSelf, -} from "@3rdweb-sdk/react/hooks/useContractRoles"; import type { JSX } from "react"; import type { ThirdwebContract } from "thirdweb"; -import type { ComponentWithChildren } from "types/component-with-children"; +import { useIsAdmin, useIsAdminOrSelf } from "@/hooks/useContractRoles"; +import type { ComponentWithChildren } from "@/types/component-with-children"; interface AdminOnlyProps { contract: ThirdwebContract; diff --git a/apps/dashboard/src/@3rdweb-sdk/react/components/roles/lister-only.tsx b/apps/dashboard/src/@/components/contracts/roles/lister-only.tsx similarity index 68% rename from apps/dashboard/src/@3rdweb-sdk/react/components/roles/lister-only.tsx rename to apps/dashboard/src/@/components/contracts/roles/lister-only.tsx index 48d0bd12f69..aba09d9debd 100644 --- a/apps/dashboard/src/@3rdweb-sdk/react/components/roles/lister-only.tsx +++ b/apps/dashboard/src/@/components/contracts/roles/lister-only.tsx @@ -1,6 +1,6 @@ -import { useIsLister } from "@3rdweb-sdk/react/hooks/useContractRoles"; import type { ThirdwebContract } from "thirdweb"; -import type { ComponentWithChildren } from "types/component-with-children"; +import { useIsLister } from "@/hooks/useContractRoles"; +import type { ComponentWithChildren } from "@/types/component-with-children"; interface IListerOnlyProps { contract: ThirdwebContract; diff --git a/apps/dashboard/src/@3rdweb-sdk/react/components/roles/minter-only.tsx b/apps/dashboard/src/@/components/contracts/roles/minter-only.tsx similarity index 68% rename from apps/dashboard/src/@3rdweb-sdk/react/components/roles/minter-only.tsx rename to apps/dashboard/src/@/components/contracts/roles/minter-only.tsx index 9d0e520c63d..2f4631e2203 100644 --- a/apps/dashboard/src/@3rdweb-sdk/react/components/roles/minter-only.tsx +++ b/apps/dashboard/src/@/components/contracts/roles/minter-only.tsx @@ -1,6 +1,6 @@ -import { useIsMinter } from "@3rdweb-sdk/react/hooks/useContractRoles"; import type { ThirdwebContract } from "thirdweb"; -import type { ComponentWithChildren } from "types/component-with-children"; +import { useIsMinter } from "@/hooks/useContractRoles"; +import type { ComponentWithChildren } from "@/types/component-with-children"; interface IMinterOnlyProps { contract: ThirdwebContract; diff --git a/apps/dashboard/src/@/components/blocks/app-footer.tsx b/apps/dashboard/src/@/components/footers/app-footer.tsx similarity index 90% rename from apps/dashboard/src/@/components/blocks/app-footer.tsx rename to apps/dashboard/src/@/components/footers/app-footer.tsx index 48d2dcaa9ff..89e1fbc2ada 100644 --- a/apps/dashboard/src/@/components/blocks/app-footer.tsx +++ b/apps/dashboard/src/@/components/footers/app-footer.tsx @@ -1,13 +1,13 @@ import { ThirdwebMiniLogo } from "app/(app)/components/ThirdwebMiniLogo"; -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 { TiktokIcon } from "components/icons/brand-icons/TiktokIcon"; -import { XIcon } from "components/icons/brand-icons/XIcon"; -import { YoutubeIcon } from "components/icons/brand-icons/YoutubeIcon"; import Link from "next/link"; import { Button } from "@/components/ui/button"; +import { GithubIcon } from "@/icons/brand-icons/GithubIcon"; +import { InstagramIcon } from "@/icons/brand-icons/InstagramIcon"; +import { LinkedInIcon } from "@/icons/brand-icons/LinkedinIcon"; +import { RedditIcon } from "@/icons/brand-icons/RedditIcon"; +import { TiktokIcon } from "@/icons/brand-icons/TiktokIcon"; +import { XIcon } from "@/icons/brand-icons/XIcon"; +import { YoutubeIcon } from "@/icons/brand-icons/YoutubeIcon"; import { cn } from "@/lib/utils"; type AppFooterProps = { diff --git a/apps/dashboard/src/components/notices/AnnouncementBanner.tsx b/apps/dashboard/src/@/components/misc/AnnouncementBanner.tsx similarity index 96% rename from apps/dashboard/src/components/notices/AnnouncementBanner.tsx rename to apps/dashboard/src/@/components/misc/AnnouncementBanner.tsx index 450fa9cf12e..a67a459992c 100644 --- a/apps/dashboard/src/components/notices/AnnouncementBanner.tsx +++ b/apps/dashboard/src/@/components/misc/AnnouncementBanner.tsx @@ -1,9 +1,9 @@ "use client"; -import { useLocalStorage } from "hooks/useLocalStorage"; import { XIcon } from "lucide-react"; import Link from "next/link"; import { Button } from "@/components/ui/button"; +import { useLocalStorage } from "@/hooks/useLocalStorage"; function AnnouncementBannerUI(props: { href: string; diff --git a/apps/dashboard/src/components/selects/CustomChainRenderer.tsx b/apps/dashboard/src/@/components/misc/CustomChainRenderer.tsx similarity index 93% rename from apps/dashboard/src/components/selects/CustomChainRenderer.tsx rename to apps/dashboard/src/@/components/misc/CustomChainRenderer.tsx index 6c8f1c19ad4..60924e2bd1a 100644 --- a/apps/dashboard/src/components/selects/CustomChainRenderer.tsx +++ b/apps/dashboard/src/@/components/misc/CustomChainRenderer.tsx @@ -1,16 +1,13 @@ -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 { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { OPSponsoredChains } from "@/constants/chains"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { ChainIconClient } from "@/icons/ChainIcon"; import { cn } from "@/lib/utils"; -import { - addRecentlyUsedChainId, - type StoredChain, -} from "../../stores/chainStores"; +import { addRecentlyUsedChainId, type StoredChain } from "@/stores/chainStores"; type ChainRenderProps = React.ComponentProps< NonNullable diff --git a/apps/dashboard/src/app/(app)/components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginClient.tsx b/apps/dashboard/src/@/components/misc/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginClient.tsx similarity index 100% rename from apps/dashboard/src/app/(app)/components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginClient.tsx rename to apps/dashboard/src/@/components/misc/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginClient.tsx diff --git a/apps/dashboard/src/app/(app)/components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer.tsx b/apps/dashboard/src/@/components/misc/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer.tsx similarity index 86% rename from apps/dashboard/src/app/(app)/components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer.tsx rename to apps/dashboard/src/@/components/misc/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer.tsx index 81ed76bbbe1..316098bd374 100644 --- a/apps/dashboard/src/app/(app)/components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer.tsx +++ b/apps/dashboard/src/@/components/misc/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer.tsx @@ -1,4 +1,4 @@ -import { getAuthTokenWalletAddress } from "../../api/lib/getAuthToken"; +import { getAuthTokenWalletAddress } from "@/api/auth-token"; import { EnsureValidConnectedWalletLoginClient } from "./EnsureValidConnectedWalletLoginClient"; // ensure that address in backend matches connected wallet address diff --git a/apps/dashboard/src/components/selects/NetworkSelectorButton.tsx b/apps/dashboard/src/@/components/misc/NetworkSelectorButton.tsx similarity index 91% rename from apps/dashboard/src/components/selects/NetworkSelectorButton.tsx rename to apps/dashboard/src/@/components/misc/NetworkSelectorButton.tsx index 39ae4c07eb6..33849ff3e15 100644 --- a/apps/dashboard/src/components/selects/NetworkSelectorButton.tsx +++ b/apps/dashboard/src/@/components/misc/NetworkSelectorButton.tsx @@ -1,27 +1,27 @@ "use client"; -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"; import { useEffect, useMemo, useRef, useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import { useActiveWallet, useNetworkSwitcherModal } from "thirdweb/react"; import { Button } from "@/components/ui/button"; +import { popularChains } from "@/constants/popularChains"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { useActiveChainAsDashboardChain } from "@/hooks/chains/v5-adapter"; +import { ChainIconClient } from "@/icons/ChainIcon"; import { useStore } from "@/lib/reactive"; import { cn } from "@/lib/utils"; -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 { addRecentlyUsedChainId, recentlyUsedChainIdsStore, type StoredChain, -} from "../../stores/chainStores"; -import { LazyConfigureNetworkModal } from "../configure-networks/LazyConfigureNetworkModal"; +} from "@/stores/chainStores"; +import { useFavoriteChainIds } from "../../../app/(app)/(dashboard)/(chain)/components/client/star-button"; +import { mapV4ChainToV5Chain } from "../../utils/map-chains"; +import { getSDKTheme } from "../../utils/sdk-component-theme"; import { CustomChainRenderer } from "./CustomChainRenderer"; +import { LazyConfigureNetworkModal } from "./configure-networks/LazyConfigureNetworkModal"; interface NetworkSelectorButtonProps { disabledChainIds?: number[]; diff --git a/apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx b/apps/dashboard/src/@/components/misc/configure-networks/ConfigureNetworkForm.tsx similarity index 98% rename from apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx rename to apps/dashboard/src/@/components/misc/configure-networks/ConfigureNetworkForm.tsx index 4de71ad3b38..404aae7b335 100644 --- a/apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx +++ b/apps/dashboard/src/@/components/misc/configure-networks/ConfigureNetworkForm.tsx @@ -1,6 +1,3 @@ -import { ChainIconClient } from "components/icons/ChainIcon"; -import { useAllChainsData } from "hooks/chains/allChains"; -import { getDashboardChainRpc } from "lib/rpc"; import { CircleAlertIcon, Trash2Icon } from "lucide-react"; import { useId } from "react"; import { useForm } from "react-hook-form"; @@ -11,12 +8,15 @@ import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { ChainIconClient } from "@/icons/ChainIcon"; import { useStore } from "@/lib/reactive"; +import { getDashboardChainRpc } from "@/lib/rpc"; import { chainOverridesStore, removeChainOverrides, type StoredChain, -} from "../../stores/chainStores"; +} from "@/stores/chainStores"; import { ChainIdInput } from "./Form/ChainIdInput"; import { IconUpload } from "./Form/IconUpload"; import { NetworkIDInput } from "./Form/NetworkIdInput"; diff --git a/apps/dashboard/src/components/configure-networks/ConfigureNetworkModal.tsx b/apps/dashboard/src/@/components/misc/configure-networks/ConfigureNetworkModal.tsx similarity index 92% rename from apps/dashboard/src/components/configure-networks/ConfigureNetworkModal.tsx rename to apps/dashboard/src/@/components/misc/configure-networks/ConfigureNetworkModal.tsx index fe10901f016..3be158dda7c 100644 --- a/apps/dashboard/src/components/configure-networks/ConfigureNetworkModal.tsx +++ b/apps/dashboard/src/@/components/misc/configure-networks/ConfigureNetworkModal.tsx @@ -1,9 +1,6 @@ import type { ThirdwebClient } from "thirdweb"; import { Dialog, DialogContent } from "@/components/ui/dialog"; -import { - addRecentlyUsedChainId, - type StoredChain, -} from "../../stores/chainStores"; +import { addRecentlyUsedChainId, type StoredChain } from "@/stores/chainStores"; import { ConfigureNetworks } from "./ConfigureNetworks"; export type ConfigureNetworkModalProps = { diff --git a/apps/dashboard/src/components/configure-networks/ConfigureNetworks.tsx b/apps/dashboard/src/@/components/misc/configure-networks/ConfigureNetworks.tsx similarity index 94% rename from apps/dashboard/src/components/configure-networks/ConfigureNetworks.tsx rename to apps/dashboard/src/@/components/misc/configure-networks/ConfigureNetworks.tsx index fb66138609a..6ca39ee6298 100644 --- a/apps/dashboard/src/components/configure-networks/ConfigureNetworks.tsx +++ b/apps/dashboard/src/@/components/misc/configure-networks/ConfigureNetworks.tsx @@ -1,11 +1,11 @@ import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; -import { reportChainConfigurationAdded } from "../../@/analytics/report"; +import { reportChainConfigurationAdded } from "@/analytics/report"; import { addChainOverrides, addRecentlyUsedChainId, type StoredChain, -} from "../../stores/chainStores"; +} from "@/stores/chainStores"; import { ConfigureNetworkForm } from "./ConfigureNetworkForm"; interface ConfigureNetworksProps { diff --git a/apps/dashboard/src/components/configure-networks/Form/ChainIdInput.tsx b/apps/dashboard/src/@/components/misc/configure-networks/Form/ChainIdInput.tsx similarity index 100% rename from apps/dashboard/src/components/configure-networks/Form/ChainIdInput.tsx rename to apps/dashboard/src/@/components/misc/configure-networks/Form/ChainIdInput.tsx diff --git a/apps/dashboard/src/components/configure-networks/Form/IconUpload.tsx b/apps/dashboard/src/@/components/misc/configure-networks/Form/IconUpload.tsx similarity index 92% rename from apps/dashboard/src/components/configure-networks/Form/IconUpload.tsx rename to apps/dashboard/src/@/components/misc/configure-networks/Form/IconUpload.tsx index ccab9adf218..a9618c51132 100644 --- a/apps/dashboard/src/components/configure-networks/Form/IconUpload.tsx +++ b/apps/dashboard/src/@/components/misc/configure-networks/Form/IconUpload.tsx @@ -1,12 +1,12 @@ -import { useDashboardStorageUpload } from "@3rdweb-sdk/react/hooks/useDashboardStorageUpload"; import { useQueryClient } from "@tanstack/react-query"; import { PINNED_FILES_QUERY_KEY_ROOT } from "app/(app)/team/[team_slug]/(team)/~/usage/storage/your-files"; -import { FileInput } from "components/shared/FileInput"; import { UploadIcon } from "lucide-react"; import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; +import { FileInput } from "@/components/blocks/FileInput"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { useDashboardStorageUpload } from "@/hooks/useDashboardStorageUpload"; export const IconUpload: React.FC<{ onUpload: (url: string) => void; diff --git a/apps/dashboard/src/components/configure-networks/Form/NetworkIdInput.tsx b/apps/dashboard/src/@/components/misc/configure-networks/Form/NetworkIdInput.tsx similarity index 96% rename from apps/dashboard/src/components/configure-networks/Form/NetworkIdInput.tsx rename to apps/dashboard/src/@/components/misc/configure-networks/Form/NetworkIdInput.tsx index 94495e91120..a7c4d900dc9 100644 --- a/apps/dashboard/src/components/configure-networks/Form/NetworkIdInput.tsx +++ b/apps/dashboard/src/@/components/misc/configure-networks/Form/NetworkIdInput.tsx @@ -1,8 +1,8 @@ -import { useAllChainsData } from "hooks/chains/allChains"; import { useId } from "react"; import type { UseFormReturn } from "react-hook-form"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; import { Input } from "@/components/ui/input"; +import { useAllChainsData } from "@/hooks/chains/allChains"; import type { NetworkConfigFormData } from "../ConfigureNetworkForm"; export const NetworkIDInput: React.FC<{ diff --git a/apps/dashboard/src/components/configure-networks/Form/RpcInput.tsx b/apps/dashboard/src/@/components/misc/configure-networks/Form/RpcInput.tsx similarity index 100% rename from apps/dashboard/src/components/configure-networks/Form/RpcInput.tsx rename to apps/dashboard/src/@/components/misc/configure-networks/Form/RpcInput.tsx diff --git a/apps/dashboard/src/components/configure-networks/LazyConfigureNetworkModal.tsx b/apps/dashboard/src/@/components/misc/configure-networks/LazyConfigureNetworkModal.tsx similarity index 100% rename from apps/dashboard/src/components/configure-networks/LazyConfigureNetworkModal.tsx rename to apps/dashboard/src/@/components/misc/configure-networks/LazyConfigureNetworkModal.tsx diff --git a/apps/dashboard/src/components/delayed-display/delayed-display.tsx b/apps/dashboard/src/@/components/misc/delayed-display.tsx similarity index 91% rename from apps/dashboard/src/components/delayed-display/delayed-display.tsx rename to apps/dashboard/src/@/components/misc/delayed-display.tsx index abc189a97af..05a3c3f17ad 100644 --- a/apps/dashboard/src/components/delayed-display/delayed-display.tsx +++ b/apps/dashboard/src/@/components/misc/delayed-display.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import type { ComponentWithChildren } from "types/component-with-children"; +import type { ComponentWithChildren } from "@/types/component-with-children"; interface DelayedDisplayProps { delay: number; diff --git a/apps/dashboard/src/@/components/blocks/notifications/notification-button.tsx b/apps/dashboard/src/@/components/notifications/notification-button.tsx similarity index 100% rename from apps/dashboard/src/@/components/blocks/notifications/notification-button.tsx rename to apps/dashboard/src/@/components/notifications/notification-button.tsx diff --git a/apps/dashboard/src/@/components/blocks/notifications/notification-entry.tsx b/apps/dashboard/src/@/components/notifications/notification-entry.tsx similarity index 100% rename from apps/dashboard/src/@/components/blocks/notifications/notification-entry.tsx rename to apps/dashboard/src/@/components/notifications/notification-entry.tsx diff --git a/apps/dashboard/src/@/components/blocks/notifications/notification-list.tsx b/apps/dashboard/src/@/components/notifications/notification-list.tsx similarity index 99% rename from apps/dashboard/src/@/components/blocks/notifications/notification-list.tsx rename to apps/dashboard/src/@/components/notifications/notification-list.tsx index b13d46130e3..d4a460abeb6 100644 --- a/apps/dashboard/src/@/components/blocks/notifications/notification-list.tsx +++ b/apps/dashboard/src/@/components/notifications/notification-list.tsx @@ -1,8 +1,8 @@ "use client"; import { ArchiveIcon, BellIcon, Loader2Icon } from "lucide-react"; import { useEffect, useRef, useState } from "react"; +import { Badge } from "@/components/ui/badge"; import { TabButtons } from "@/components/ui/tabs"; -import { Badge } from "../../ui/badge"; import { NotificationEntry } from "./notification-entry"; import type { useNotifications } from "./state/manager"; diff --git a/apps/dashboard/src/@/components/blocks/notifications/state/manager.ts b/apps/dashboard/src/@/components/notifications/state/manager.ts similarity index 100% rename from apps/dashboard/src/@/components/blocks/notifications/state/manager.ts rename to apps/dashboard/src/@/components/notifications/state/manager.ts diff --git a/apps/dashboard/src/components/settings/ApiKeys/Create/CreateApiKeyModal.stories.tsx b/apps/dashboard/src/@/components/project/create-project-modal/CreateApiKeyModal.stories.tsx similarity index 95% rename from apps/dashboard/src/components/settings/ApiKeys/Create/CreateApiKeyModal.stories.tsx rename to apps/dashboard/src/@/components/project/create-project-modal/CreateApiKeyModal.stories.tsx index 35999e19cff..e4e05ebf6c1 100644 --- a/apps/dashboard/src/components/settings/ApiKeys/Create/CreateApiKeyModal.stories.tsx +++ b/apps/dashboard/src/@/components/project/create-project-modal/CreateApiKeyModal.stories.tsx @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useState } from "react"; import { Button } from "@/components/ui/button"; -import { projectStub } from "../../../../stories/stubs"; +import { projectStub } from "@/storybook/stubs"; import { CreateProjectDialogUI, type CreateProjectPrefillOptions } from "."; const meta = { diff --git a/apps/dashboard/src/components/settings/ApiKeys/Create/LazyCreateAPIKeyDialog.tsx b/apps/dashboard/src/@/components/project/create-project-modal/LazyCreateAPIKeyDialog.tsx similarity index 100% rename from apps/dashboard/src/components/settings/ApiKeys/Create/LazyCreateAPIKeyDialog.tsx rename to apps/dashboard/src/@/components/project/create-project-modal/LazyCreateAPIKeyDialog.tsx diff --git a/apps/dashboard/src/components/settings/ApiKeys/Create/index.tsx b/apps/dashboard/src/@/components/project/create-project-modal/index.tsx similarity index 98% rename from apps/dashboard/src/components/settings/ApiKeys/Create/index.tsx rename to apps/dashboard/src/@/components/project/create-project-modal/index.tsx index 1f7ee60c966..850504a947a 100644 --- a/apps/dashboard/src/components/settings/ApiKeys/Create/index.tsx +++ b/apps/dashboard/src/@/components/project/create-project-modal/index.tsx @@ -1,4 +1,3 @@ -import { createProjectClient } from "@3rdweb-sdk/react/hooks/useApi"; import { zodResolver } from "@hookform/resolvers/zod"; import { DialogDescription } from "@radix-ui/react-dialog"; import { useMutation } from "@tanstack/react-query"; @@ -8,7 +7,6 @@ import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; -import { toArrFromList } from "utils/string"; import { z } from "zod"; import type { Project } from "@/api/projects"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; @@ -36,8 +34,10 @@ import { import { Input } from "@/components/ui/input"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { Textarea } from "@/components/ui/textarea"; +import { createProjectClient } from "@/hooks/useApi"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { projectDomainsSchema, projectNameSchema } from "../validations"; +import { projectDomainsSchema, projectNameSchema } from "@/schema/validations"; +import { toArrFromList } from "@/utils/string"; const ALL_PROJECT_SERVICES = SERVICES.filter( (srv) => diff --git a/apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx b/apps/dashboard/src/@/components/solidity-inputs/address-input.tsx similarity index 98% rename from apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx rename to apps/dashboard/src/@/components/solidity-inputs/address-input.tsx index bc8a3bb2c6e..3cb1abbef68 100644 --- a/apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx +++ b/apps/dashboard/src/@/components/solidity-inputs/address-input.tsx @@ -1,12 +1,12 @@ "use client"; -import { useEns } from "components/contract-components/hooks"; import { CheckIcon } from "lucide-react"; import { useEffect, useMemo, useState } from "react"; import { useActiveAccount } from "thirdweb/react"; import { isAddress, isValidENSName } from "thirdweb/utils"; import { Input } from "@/components/ui/input"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { useEns } from "@/hooks/contract-hooks"; import type { SolidityInputProps } from "."; import { validateAddress } from "./helpers"; diff --git a/apps/dashboard/src/contract-ui/components/solidity-inputs/bool-input.tsx b/apps/dashboard/src/@/components/solidity-inputs/bool-input.tsx similarity index 100% rename from apps/dashboard/src/contract-ui/components/solidity-inputs/bool-input.tsx rename to apps/dashboard/src/@/components/solidity-inputs/bool-input.tsx diff --git a/apps/dashboard/src/components/ipfs-upload/button.tsx b/apps/dashboard/src/@/components/solidity-inputs/button.tsx similarity index 83% rename from apps/dashboard/src/components/ipfs-upload/button.tsx rename to apps/dashboard/src/@/components/solidity-inputs/button.tsx index a5c744bf1c4..13d169d4bc7 100644 --- a/apps/dashboard/src/components/ipfs-upload/button.tsx +++ b/apps/dashboard/src/@/components/solidity-inputs/button.tsx @@ -1,11 +1,11 @@ import type { UseMutationResult } from "@tanstack/react-query"; -import { FileInput } from "components/shared/FileInput"; -import { useErrorHandler } from "contexts/error-handler"; +import { Button, type ButtonProps } from "chakra/button"; import { UploadIcon } from "lucide-react"; import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; -import { Button, type ButtonProps } from "tw-components"; -import type { ComponentWithChildren } from "types/component-with-children"; +import { FileInput } from "@/components/blocks/FileInput"; +import { useErrorHandler } from "@/contexts/error-handler"; +import type { ComponentWithChildren } from "@/types/component-with-children"; interface IpfsUploadButtonProps extends ButtonProps { // biome-ignore lint/suspicious/noExplicitAny: FIXME diff --git a/apps/dashboard/src/contract-ui/components/solidity-inputs/bytes-input.tsx b/apps/dashboard/src/@/components/solidity-inputs/bytes-input.tsx similarity index 100% rename from apps/dashboard/src/contract-ui/components/solidity-inputs/bytes-input.tsx rename to apps/dashboard/src/@/components/solidity-inputs/bytes-input.tsx diff --git a/apps/dashboard/src/contract-ui/components/solidity-inputs/helpers.ts b/apps/dashboard/src/@/components/solidity-inputs/helpers.ts similarity index 100% rename from apps/dashboard/src/contract-ui/components/solidity-inputs/helpers.ts rename to apps/dashboard/src/@/components/solidity-inputs/helpers.ts diff --git a/apps/dashboard/src/contract-ui/components/solidity-inputs/index.tsx b/apps/dashboard/src/@/components/solidity-inputs/index.tsx similarity index 100% rename from apps/dashboard/src/contract-ui/components/solidity-inputs/index.tsx rename to apps/dashboard/src/@/components/solidity-inputs/index.tsx diff --git a/apps/dashboard/src/contract-ui/components/solidity-inputs/int-input.tsx b/apps/dashboard/src/@/components/solidity-inputs/int-input.tsx similarity index 100% rename from apps/dashboard/src/contract-ui/components/solidity-inputs/int-input.tsx rename to apps/dashboard/src/@/components/solidity-inputs/int-input.tsx diff --git a/apps/dashboard/src/contract-ui/components/solidity-inputs/raw-input.tsx b/apps/dashboard/src/@/components/solidity-inputs/raw-input.tsx similarity index 100% rename from apps/dashboard/src/contract-ui/components/solidity-inputs/raw-input.tsx rename to apps/dashboard/src/@/components/solidity-inputs/raw-input.tsx diff --git a/apps/dashboard/src/contract-ui/components/solidity-inputs/string-input.tsx b/apps/dashboard/src/@/components/solidity-inputs/string-input.tsx similarity index 94% rename from apps/dashboard/src/contract-ui/components/solidity-inputs/string-input.tsx rename to apps/dashboard/src/@/components/solidity-inputs/string-input.tsx index e3172d4d1fb..c670b2c9fd8 100644 --- a/apps/dashboard/src/contract-ui/components/solidity-inputs/string-input.tsx +++ b/apps/dashboard/src/@/components/solidity-inputs/string-input.tsx @@ -1,8 +1,8 @@ -import { useDashboardStorageUpload } from "@3rdweb-sdk/react/hooks/useDashboardStorageUpload"; import { useQueryClient } from "@tanstack/react-query"; import { PINNED_FILES_QUERY_KEY_ROOT } from "app/(app)/team/[team_slug]/(team)/~/usage/storage/your-files"; -import { IpfsUploadButton } from "components/ipfs-upload/button"; +import { IpfsUploadButton } from "@/components/solidity-inputs/button"; import { Input } from "@/components/ui/input"; +import { useDashboardStorageUpload } from "@/hooks/useDashboardStorageUpload"; import { cn } from "@/lib/utils"; import type { SolidityInputWithTypeProps } from "."; diff --git a/apps/dashboard/src/contract-ui/components/solidity-inputs/tuple-input.tsx b/apps/dashboard/src/@/components/solidity-inputs/tuple-input.tsx similarity index 100% rename from apps/dashboard/src/contract-ui/components/solidity-inputs/tuple-input.tsx rename to apps/dashboard/src/@/components/solidity-inputs/tuple-input.tsx diff --git a/apps/dashboard/src/components/buttons/MismatchButton.tsx b/apps/dashboard/src/@/components/tx-button/MismatchButton.tsx similarity index 97% rename from apps/dashboard/src/components/buttons/MismatchButton.tsx rename to apps/dashboard/src/@/components/tx-button/MismatchButton.tsx index fa0c0b7bdce..f6b47ef9e99 100644 --- a/apps/dashboard/src/components/buttons/MismatchButton.tsx +++ b/apps/dashboard/src/@/components/tx-button/MismatchButton.tsx @@ -1,15 +1,9 @@ "use client"; +import { getFaucetClaimAmount } from "@app/api/testnet-faucet/claim/claim-amount"; import { useMutation, useQuery } from "@tanstack/react-query"; import { FaucetButton } from "app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton"; import { GiftIcon } from "app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/icons/GiftIcon"; -import type { - ChainMetadataWithServices, - ChainServices, -} from "app/(app)/(dashboard)/(chain)/types/chain"; -import { getSDKTheme } from "app/(app)/components/sdk-component-theme"; -import { LOCAL_NODE_PKEY } from "constants/misc"; -import { useAllChainsData } from "hooks/chains/allChains"; import { ExternalLinkIcon, UnplugIcon } from "lucide-react"; import Link from "next/link"; import { usePathname } from "next/navigation"; @@ -50,9 +44,12 @@ import { PopoverTrigger, } from "@/components/ui/popover"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { LOCAL_NODE_PKEY } from "@/constants/misc"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; import { cn } from "@/lib/utils"; -import { getFaucetClaimAmount } from "../../app/(app)/api/testnet-faucet/claim/claim-amount"; -import { useV5DashboardChain } from "../../lib/v5-adapter"; +import type { ChainMetadataWithServices, ChainServices } from "@/types/chain"; +import { getSDKTheme } from "@/utils/sdk-component-theme"; const GAS_FREE_CHAINS = [ 75513, // Geek verse testnet diff --git a/apps/dashboard/src/components/buttons/TransactionButton.stories.tsx b/apps/dashboard/src/@/components/tx-button/TransactionButton.stories.tsx similarity index 97% rename from apps/dashboard/src/components/buttons/TransactionButton.stories.tsx rename to apps/dashboard/src/@/components/tx-button/TransactionButton.stories.tsx index 12b4d1a45a4..bab69617ef0 100644 --- a/apps/dashboard/src/components/buttons/TransactionButton.stories.tsx +++ b/apps/dashboard/src/@/components/tx-button/TransactionButton.stories.tsx @@ -13,8 +13,8 @@ import { SelectValue, } from "@/components/ui/select"; import { Switch } from "@/components/ui/switch"; -import { BadgeContainer, storybookThirdwebClient } from "../../stories/utils"; -import { TransactionButton } from "./TransactionButton"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; +import { TransactionButton } from "./index"; const meta = { component: Story, diff --git a/apps/dashboard/src/components/buttons/TransactionButton.tsx b/apps/dashboard/src/@/components/tx-button/index.tsx similarity index 98% rename from apps/dashboard/src/components/buttons/TransactionButton.tsx rename to apps/dashboard/src/@/components/tx-button/index.tsx index 3e347c888f0..763c4de54f6 100644 --- a/apps/dashboard/src/components/buttons/TransactionButton.tsx +++ b/apps/dashboard/src/@/components/tx-button/index.tsx @@ -1,6 +1,4 @@ "use client"; -import { CHAIN_ID_TO_GNOSIS } from "constants/mappings"; -import { useActiveChainAsDashboardChain } from "lib/v5-adapter"; import { ArrowLeftRightIcon, ExternalLinkIcon } from "lucide-react"; import Link from "next/link"; import { useEffect, useMemo, useRef, useState } from "react"; @@ -19,6 +17,8 @@ import { PopoverTrigger, } from "@/components/ui/popover"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { CHAIN_ID_TO_GNOSIS } from "@/constants/mappings"; +import { useActiveChainAsDashboardChain } from "@/hooks/chains/v5-adapter"; import { cn } from "@/lib/utils"; import { MismatchButton } from "./MismatchButton"; diff --git a/apps/dashboard/src/@/components/ui/CopyButton.tsx b/apps/dashboard/src/@/components/ui/CopyButton.tsx index 4e46643cbd7..99f702f952b 100644 --- a/apps/dashboard/src/@/components/ui/CopyButton.tsx +++ b/apps/dashboard/src/@/components/ui/CopyButton.tsx @@ -1,7 +1,7 @@ "use client"; -import { useClipboard } from "hooks/useClipboard"; import { CheckIcon, CopyIcon } from "lucide-react"; +import { useClipboard } from "@/hooks/useClipboard"; import { cn } from "@/lib/utils"; import { Button } from "./button"; import { ToolTipLabel } from "./tooltip"; diff --git a/apps/dashboard/src/@/components/ui/CopyTextButton.tsx b/apps/dashboard/src/@/components/ui/CopyTextButton.tsx index b34e8043b69..1ae9f9375b3 100644 --- a/apps/dashboard/src/@/components/ui/CopyTextButton.tsx +++ b/apps/dashboard/src/@/components/ui/CopyTextButton.tsx @@ -1,7 +1,7 @@ "use client"; -import { useClipboard } from "hooks/useClipboard"; import { CheckIcon, CopyIcon } from "lucide-react"; +import { useClipboard } from "@/hooks/useClipboard"; import { cn } from "@/lib/utils"; import { Button } from "./button"; import { ToolTipLabel } from "./tooltip"; diff --git a/apps/dashboard/src/@/components/ui/Spinner/Spinner.tsx b/apps/dashboard/src/@/components/ui/Spinner/Spinner.tsx index 4db57326dba..52c9eb74057 100644 --- a/apps/dashboard/src/@/components/ui/Spinner/Spinner.tsx +++ b/apps/dashboard/src/@/components/ui/Spinner/Spinner.tsx @@ -1,4 +1,4 @@ -import { cn } from "../../../lib/utils"; +import { cn } from "@/lib/utils"; import style from "./Spinner.module.css"; export function Spinner(props: { className?: string }) { diff --git a/apps/dashboard/src/@/components/ui/button.stories.tsx b/apps/dashboard/src/@/components/ui/button.stories.tsx index 2ac4a5c33c1..8a6ef20f74c 100644 --- a/apps/dashboard/src/@/components/ui/button.stories.tsx +++ b/apps/dashboard/src/@/components/ui/button.stories.tsx @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { StarIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; const meta = { component: Component, diff --git a/apps/dashboard/src/@/components/ui/code/CodeBlockContainer.tsx b/apps/dashboard/src/@/components/ui/code/CodeBlockContainer.tsx index aa5bc4d7ec5..38d055d9b66 100644 --- a/apps/dashboard/src/@/components/ui/code/CodeBlockContainer.tsx +++ b/apps/dashboard/src/@/components/ui/code/CodeBlockContainer.tsx @@ -1,10 +1,10 @@ "use client"; -import { useClipboard } from "hooks/useClipboard"; import { CheckIcon, CopyIcon } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; +import { useClipboard } from "@/hooks/useClipboard"; import { cn } from "@/lib/utils"; -import { Button } from "../button"; -import { ScrollShadow } from "../ScrollShadow/ScrollShadow"; export function CodeBlockContainer(props: { codeToCopy: string; diff --git a/apps/dashboard/src/@/components/ui/code/code.stories.tsx b/apps/dashboard/src/@/components/ui/code/code.stories.tsx index 36e86663c3d..6c134227fc2 100644 --- a/apps/dashboard/src/@/components/ui/code/code.stories.tsx +++ b/apps/dashboard/src/@/components/ui/code/code.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { CodeClient } from "./code.client"; const meta = { diff --git a/apps/dashboard/src/@/components/ui/code/plaintext-code.stories.tsx b/apps/dashboard/src/@/components/ui/code/plaintext-code.stories.tsx index 42bcdbd668f..00064cba244 100644 --- a/apps/dashboard/src/@/components/ui/code/plaintext-code.stories.tsx +++ b/apps/dashboard/src/@/components/ui/code/plaintext-code.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { PlainTextCodeBlock } from "./plaintext-code"; const meta = { diff --git a/apps/dashboard/src/@/components/ui/select.stories.tsx b/apps/dashboard/src/@/components/ui/select.stories.tsx index d2a913ea411..c729ef6d6c2 100644 --- a/apps/dashboard/src/@/components/ui/select.stories.tsx +++ b/apps/dashboard/src/@/components/ui/select.stories.tsx @@ -8,7 +8,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; const meta = { component: Component, diff --git a/apps/dashboard/src/@/components/ui/table.stories.tsx b/apps/dashboard/src/@/components/ui/table.stories.tsx index d2682e07294..5bc9e7bccda 100644 --- a/apps/dashboard/src/@/components/ui/table.stories.tsx +++ b/apps/dashboard/src/@/components/ui/table.stories.tsx @@ -10,7 +10,7 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { cn } from "../../lib/utils"; import { Badge } from "./badge"; diff --git a/apps/dashboard/src/@/components/ui/text-shimmer.tsx b/apps/dashboard/src/@/components/ui/text-shimmer.tsx index d9929da529a..f6006c11f8d 100644 --- a/apps/dashboard/src/@/components/ui/text-shimmer.tsx +++ b/apps/dashboard/src/@/components/ui/text-shimmer.tsx @@ -1,4 +1,4 @@ -import { cn } from "../../lib/utils"; +import { cn } from "@/lib/utils"; export function TextShimmer(props: { text: string; className?: string }) { return ( diff --git a/apps/dashboard/src/constants/addresses.ts b/apps/dashboard/src/@/constants/addresses.ts similarity index 100% rename from apps/dashboard/src/constants/addresses.ts rename to apps/dashboard/src/@/constants/addresses.ts diff --git a/apps/dashboard/src/constants/chains.ts b/apps/dashboard/src/@/constants/chains.ts similarity index 100% rename from apps/dashboard/src/constants/chains.ts rename to apps/dashboard/src/@/constants/chains.ts diff --git a/apps/dashboard/src/constants/cookies.ts b/apps/dashboard/src/@/constants/cookies.ts similarity index 100% rename from apps/dashboard/src/constants/cookies.ts rename to apps/dashboard/src/@/constants/cookies.ts diff --git a/apps/dashboard/src/constants/currencies.ts b/apps/dashboard/src/@/constants/currencies.ts similarity index 100% rename from apps/dashboard/src/constants/currencies.ts rename to apps/dashboard/src/@/constants/currencies.ts diff --git a/apps/dashboard/src/lib/engine.ts b/apps/dashboard/src/@/constants/engine.ts similarity index 100% rename from apps/dashboard/src/lib/engine.ts rename to apps/dashboard/src/@/constants/engine.ts diff --git a/apps/dashboard/src/data/eth-sanctioned-addresses.ts b/apps/dashboard/src/@/constants/eth-sanctioned-addresses.ts similarity index 100% rename from apps/dashboard/src/data/eth-sanctioned-addresses.ts rename to apps/dashboard/src/@/constants/eth-sanctioned-addresses.ts diff --git a/apps/dashboard/src/constants/fee-config.ts b/apps/dashboard/src/@/constants/fee-config.ts similarity index 100% rename from apps/dashboard/src/constants/fee-config.ts rename to apps/dashboard/src/@/constants/fee-config.ts diff --git a/apps/dashboard/src/constants/mappings.ts b/apps/dashboard/src/@/constants/mappings.ts similarity index 100% rename from apps/dashboard/src/constants/mappings.ts rename to apps/dashboard/src/@/constants/mappings.ts diff --git a/apps/dashboard/src/constants/misc.ts b/apps/dashboard/src/@/constants/misc.ts similarity index 100% rename from apps/dashboard/src/constants/misc.ts rename to apps/dashboard/src/@/constants/misc.ts diff --git a/apps/dashboard/src/components/settings/Account/Billing/planToTierRecord.ts b/apps/dashboard/src/@/constants/planToTierRecord.ts similarity index 100% rename from apps/dashboard/src/components/settings/Account/Billing/planToTierRecord.ts rename to apps/dashboard/src/@/constants/planToTierRecord.ts diff --git a/apps/dashboard/src/@3rdweb-sdk/react/components/popularChains.ts b/apps/dashboard/src/@/constants/popularChains.ts similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/components/popularChains.ts rename to apps/dashboard/src/@/constants/popularChains.ts diff --git a/apps/dashboard/src/constants/pro.ts b/apps/dashboard/src/@/constants/pro.ts similarity index 100% rename from apps/dashboard/src/constants/pro.ts rename to apps/dashboard/src/@/constants/pro.ts diff --git a/apps/dashboard/src/@/constants/thirdweb.server.ts b/apps/dashboard/src/@/constants/thirdweb.server.ts index 0773a6d27c9..cfa24f269bf 100644 --- a/apps/dashboard/src/@/constants/thirdweb.server.ts +++ b/apps/dashboard/src/@/constants/thirdweb.server.ts @@ -1,13 +1,3 @@ -import { - THIRDWEB_BRIDGE_URL, - THIRDWEB_BUNDLER_DOMAIN, - THIRDWEB_INAPP_WALLET_DOMAIN, - THIRDWEB_INSIGHT_API_DOMAIN, - THIRDWEB_PAY_DOMAIN, - THIRDWEB_RPC_DOMAIN, - THIRDWEB_SOCIAL_API_DOMAIN, - THIRDWEB_STORAGE_DOMAIN, -} from "constants/urls"; import { createThirdwebClient, type ThirdwebClient } from "thirdweb"; import { populateEip712Transaction } from "thirdweb/transaction"; import { @@ -20,7 +10,17 @@ import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID, NEXT_PUBLIC_IPFS_GATEWAY_URL, } from "@/constants/public-envs"; -import { getVercelEnv } from "../../lib/vercel-utils"; +import { + THIRDWEB_BRIDGE_URL, + THIRDWEB_BUNDLER_DOMAIN, + THIRDWEB_INAPP_WALLET_DOMAIN, + THIRDWEB_INSIGHT_API_DOMAIN, + THIRDWEB_PAY_DOMAIN, + THIRDWEB_RPC_DOMAIN, + THIRDWEB_SOCIAL_API_DOMAIN, + THIRDWEB_STORAGE_DOMAIN, +} from "@/constants/urls"; +import { getVercelEnv } from "@/utils/vercel"; export function getConfiguredThirdwebClient(options: { secretKey: string | undefined; diff --git a/apps/dashboard/src/constants/urls.ts b/apps/dashboard/src/@/constants/urls.ts similarity index 100% rename from apps/dashboard/src/constants/urls.ts rename to apps/dashboard/src/@/constants/urls.ts diff --git a/apps/dashboard/src/contexts/error-handler.tsx b/apps/dashboard/src/@/contexts/error-handler.tsx similarity index 97% rename from apps/dashboard/src/contexts/error-handler.tsx rename to apps/dashboard/src/@/contexts/error-handler.tsx index 408944ba97f..2e4f5ff9788 100644 --- a/apps/dashboard/src/contexts/error-handler.tsx +++ b/apps/dashboard/src/@/contexts/error-handler.tsx @@ -4,9 +4,7 @@ import { CircleAlertIcon, InfoIcon } from "lucide-react"; import Link from "next/link"; import { createContext, useCallback, useContext, useState } from "react"; import { toast } from "sonner"; -import type { ComponentWithChildren } from "types/component-with-children"; import { useDebounce } from "use-debounce"; -import { parseErrorToMessage } from "utils/errorParser"; import { Button } from "@/components/ui/button"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { @@ -15,6 +13,8 @@ import { DialogHeader, DialogTitle, } from "@/components/ui/dialog"; +import type { ComponentWithChildren } from "@/types/component-with-children"; +import { parseErrorToMessage } from "@/utils/errorParser"; interface ErrorContext { onError: (error: unknown, errorTitle?: string) => void; diff --git a/apps/dashboard/src/hooks/chains/allChains.ts b/apps/dashboard/src/@/hooks/chains/allChains.ts similarity index 96% rename from apps/dashboard/src/hooks/chains/allChains.ts rename to apps/dashboard/src/@/hooks/chains/allChains.ts index 2764d960bdc..6886abbd28c 100644 --- a/apps/dashboard/src/hooks/chains/allChains.ts +++ b/apps/dashboard/src/@/hooks/chains/allChains.ts @@ -5,11 +5,8 @@ import { useEffect } from "react"; import type { Chain, ChainMetadata } from "thirdweb/chains"; import { isProd } from "@/constants/env-utils"; import { createStore, useStore } from "@/lib/reactive"; -import { mapV4ChainToV5Chain } from "../../contexts/map-chains"; -import { - chainOverridesStore, - type StoredChain, -} from "../../stores/chainStores"; +import { chainOverridesStore, type StoredChain } from "@/stores/chainStores"; +import { mapV4ChainToV5Chain } from "@/utils/map-chains"; type AllChainsStore = { allChains: StoredChain[]; diff --git a/apps/dashboard/src/hooks/chains/chainSlug.ts b/apps/dashboard/src/@/hooks/chains/chainSlug.ts similarity index 100% rename from apps/dashboard/src/hooks/chains/chainSlug.ts rename to apps/dashboard/src/@/hooks/chains/chainSlug.ts diff --git a/apps/dashboard/src/lib/v5-adapter.ts b/apps/dashboard/src/@/hooks/chains/v5-adapter.ts similarity index 90% rename from apps/dashboard/src/lib/v5-adapter.ts rename to apps/dashboard/src/@/hooks/chains/v5-adapter.ts index 8fe42c5f1c1..523c0cfe640 100644 --- a/apps/dashboard/src/lib/v5-adapter.ts +++ b/apps/dashboard/src/@/hooks/chains/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"; +import { defineDashboardChain } from "@/lib/defineDashboardChain"; export function useV5DashboardChain(chainId: undefined): undefined; export function useV5DashboardChain(chainId: number): Chain; diff --git a/apps/dashboard/src/components/contract-components/hooks.ts b/apps/dashboard/src/@/hooks/contract-hooks.ts similarity index 93% rename from apps/dashboard/src/components/contract-components/hooks.ts rename to apps/dashboard/src/@/hooks/contract-hooks.ts index e1c41227d6a..a8453842438 100644 --- a/apps/dashboard/src/components/contract-components/hooks.ts +++ b/apps/dashboard/src/@/hooks/contract-hooks.ts @@ -2,18 +2,18 @@ import { queryOptions, useQuery } from "@tanstack/react-query"; import type { Abi } from "abitype"; -import { resolveEns } from "lib/ens"; -import { useV5DashboardChain } from "lib/v5-adapter"; import { useMemo } from "react"; import type { ThirdwebClient, ThirdwebContract } from "thirdweb"; import { getContract, resolveContractAbi } from "thirdweb/contract"; import { isAddress, isValidENSName } from "thirdweb/utils"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; +import { resolveEns } from "@/lib/ens"; import { fetchPublishedContractVersions, type PublishedContractWithVersion, -} from "./fetch-contracts-with-versions"; -import { fetchPublishedContracts } from "./fetchPublishedContracts"; -import { fetchPublishedContractsFromDeploy } from "./fetchPublishedContractsFromDeploy"; +} from "../components/contract-components/fetch-contracts-with-versions"; +import { fetchPublishedContracts } from "../components/contract-components/fetchPublishedContracts"; +import { fetchPublishedContractsFromDeploy } from "../components/contract-components/fetchPublishedContractsFromDeploy"; export function useAllVersions( publisherAddress: string | undefined, @@ -71,6 +71,7 @@ export function usePublishedContractFunctions( return publishedContract?.abi?.filter((f) => f.type === "function") || []; } + export function usePublishedContractEvents( publishedContract: PublishedContractWithVersion, ) { diff --git a/apps/dashboard/src/contract-ui/hooks/permissions.ts b/apps/dashboard/src/@/hooks/contract-ui/permissions.ts similarity index 100% rename from apps/dashboard/src/contract-ui/hooks/permissions.ts rename to apps/dashboard/src/@/hooks/contract-ui/permissions.ts diff --git a/apps/dashboard/src/contract-ui/hooks/useContractFunctionComment.ts b/apps/dashboard/src/@/hooks/contract-ui/useContractFunctionComment.ts similarity index 100% rename from apps/dashboard/src/contract-ui/hooks/useContractFunctionComment.ts rename to apps/dashboard/src/@/hooks/contract-ui/useContractFunctionComment.ts diff --git a/apps/dashboard/src/contract-ui/hooks/useContractFunctionSelectors.ts b/apps/dashboard/src/@/hooks/contract-ui/useContractFunctionSelectors.ts similarity index 87% rename from apps/dashboard/src/contract-ui/hooks/useContractFunctionSelectors.ts rename to apps/dashboard/src/@/hooks/contract-ui/useContractFunctionSelectors.ts index e24d9306682..6057e72a206 100644 --- a/apps/dashboard/src/contract-ui/hooks/useContractFunctionSelectors.ts +++ b/apps/dashboard/src/@/hooks/contract-ui/useContractFunctionSelectors.ts @@ -1,6 +1,6 @@ import { useQuery } from "@tanstack/react-query"; -import { resolveFunctionSelectors } from "lib/selectors"; import type { ThirdwebContract } from "thirdweb"; +import { resolveFunctionSelectors } from "@/lib/selectors"; export function useContractFunctionSelectors(contract: ThirdwebContract) { return useQuery({ diff --git a/apps/dashboard/src/contract-ui/hooks/useContractSources.ts b/apps/dashboard/src/@/hooks/contract-ui/useContractSources.ts similarity index 100% rename from apps/dashboard/src/contract-ui/hooks/useContractSources.ts rename to apps/dashboard/src/@/hooks/contract-ui/useContractSources.ts diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/hooks/project-contracts.ts b/apps/dashboard/src/@/hooks/project-contracts.ts similarity index 100% rename from apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/hooks/project-contracts.ts rename to apps/dashboard/src/@/hooks/project-contracts.ts diff --git a/apps/dashboard/src/app/(app)/(stripe)/stripe-redirect/stripeRedirectChannel.ts b/apps/dashboard/src/@/hooks/stripe/redirect-event.ts similarity index 100% rename from apps/dashboard/src/app/(app)/(stripe)/stripe-redirect/stripeRedirectChannel.ts rename to apps/dashboard/src/@/hooks/stripe/redirect-event.ts diff --git a/apps/dashboard/src/hooks/tokens/tokens.ts b/apps/dashboard/src/@/hooks/tokens.ts similarity index 100% rename from apps/dashboard/src/hooks/tokens/tokens.ts rename to apps/dashboard/src/@/hooks/tokens.ts diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useActiveChainId.tsx b/apps/dashboard/src/@/hooks/useActiveChainId.tsx similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useActiveChainId.tsx rename to apps/dashboard/src/@/hooks/useActiveChainId.tsx diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useActivity.ts b/apps/dashboard/src/@/hooks/useActivity.ts similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useActivity.ts rename to apps/dashboard/src/@/hooks/useActivity.ts diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts b/apps/dashboard/src/@/hooks/useApi.ts similarity index 99% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts rename to apps/dashboard/src/@/hooks/useApi.ts index 3c7888062f0..3e7b8353bf3 100644 --- a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts +++ b/apps/dashboard/src/@/hooks/useApi.ts @@ -2,7 +2,7 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { useActiveAccount } from "thirdweb/react"; import { apiServerProxy } from "@/actions/proxies"; import type { Project } from "@/api/projects"; -import { accountKeys, authorizedWallets } from "../cache-keys"; +import { accountKeys, authorizedWallets } from "../query-keys/cache-keys"; // FIXME: We keep repeating types, API server should provide them diff --git a/apps/dashboard/src/hooks/useClipboard.ts b/apps/dashboard/src/@/hooks/useClipboard.ts similarity index 100% rename from apps/dashboard/src/hooks/useClipboard.ts rename to apps/dashboard/src/@/hooks/useClipboard.ts diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useContractRoles.ts b/apps/dashboard/src/@/hooks/useContractRoles.ts similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useContractRoles.ts rename to apps/dashboard/src/@/hooks/useContractRoles.ts diff --git a/apps/dashboard/src/hooks/useCsvUpload.ts b/apps/dashboard/src/@/hooks/useCsvUpload.ts similarity index 99% rename from apps/dashboard/src/hooks/useCsvUpload.ts rename to apps/dashboard/src/@/hooks/useCsvUpload.ts index f2b1eb95b58..b3028734327 100644 --- a/apps/dashboard/src/hooks/useCsvUpload.ts +++ b/apps/dashboard/src/@/hooks/useCsvUpload.ts @@ -4,7 +4,7 @@ import Papa from "papaparse"; import { useCallback, useState } from "react"; import { isAddress, type ThirdwebClient, ZERO_ADDRESS } from "thirdweb"; import { resolveAddress } from "thirdweb/extensions/ens"; -import { csvMimeTypes } from "utils/batch"; +import { csvMimeTypes } from "@/utils/batch"; /** * Validate if the item.address is a valid ethereum address diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useDashboardContractMetadata.tsx b/apps/dashboard/src/@/hooks/useDashboardContractMetadata.tsx similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useDashboardContractMetadata.tsx rename to apps/dashboard/src/@/hooks/useDashboardContractMetadata.tsx diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useDashboardOwnedNFTs.ts b/apps/dashboard/src/@/hooks/useDashboardOwnedNFTs.ts similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useDashboardOwnedNFTs.ts rename to apps/dashboard/src/@/hooks/useDashboardOwnedNFTs.ts diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useDashboardStorageUpload.tsx b/apps/dashboard/src/@/hooks/useDashboardStorageUpload.tsx similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useDashboardStorageUpload.tsx rename to apps/dashboard/src/@/hooks/useDashboardStorageUpload.tsx diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useEmbeddedWallets.ts b/apps/dashboard/src/@/hooks/useEmbeddedWallets.ts similarity index 95% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useEmbeddedWallets.ts rename to apps/dashboard/src/@/hooks/useEmbeddedWallets.ts index fc72a3b7963..1cde81c06b0 100644 --- a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useEmbeddedWallets.ts +++ b/apps/dashboard/src/@/hooks/useEmbeddedWallets.ts @@ -1,8 +1,8 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { THIRDWEB_EWS_API_HOST } from "constants/urls"; import { useActiveAccount } from "thirdweb/react"; import type { WalletUser } from "thirdweb/wallets"; -import { embeddedWalletsKeys } from "../cache-keys"; +import { THIRDWEB_EWS_API_HOST } from "@/constants/urls"; +import { embeddedWalletsKeys } from "../query-keys/cache-keys"; const fetchAccountList = ({ jwt, diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts b/apps/dashboard/src/@/hooks/useEngine.ts similarity index 99% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts rename to apps/dashboard/src/@/hooks/useEngine.ts index a143c37b848..b7ce2eb0bc8 100644 --- a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts +++ b/apps/dashboard/src/@/hooks/useEngine.ts @@ -6,14 +6,14 @@ import { useQuery, useQueryClient, } from "@tanstack/react-query"; -import type { EngineBackendWalletType } from "lib/engine"; import { useState } from "react"; import { useActiveAccount } from "thirdweb/react"; import invariant from "tiny-invariant"; import { apiServerProxy } from "@/actions/proxies"; -import type { ResultItem } from "../../../app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/metrics/components/StatusCodes"; -import type { EngineStatus } from "../../../app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transactions-table"; -import { engineKeys } from "../cache-keys"; +import type { EngineBackendWalletType } from "@/constants/engine"; +import type { ResultItem } from "../../app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/metrics/components/StatusCodes"; +import type { EngineStatus } from "../../app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transactions-table"; +import { engineKeys } from "../query-keys/cache-keys"; // Engine instances export type EngineInstance = { diff --git a/apps/dashboard/src/hooks/useLocalStorage.ts b/apps/dashboard/src/@/hooks/useLocalStorage.ts similarity index 95% rename from apps/dashboard/src/hooks/useLocalStorage.ts rename to apps/dashboard/src/@/hooks/useLocalStorage.ts index 59694e0a1d5..4219805f904 100644 --- a/apps/dashboard/src/hooks/useLocalStorage.ts +++ b/apps/dashboard/src/@/hooks/useLocalStorage.ts @@ -1,7 +1,7 @@ "use client"; import { useEffect, useState } from "react"; -import { isBrowser } from "utils/isBrowser"; +import { isBrowser } from "@/utils/isBrowser"; export function useLocalStorage( key: string, diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useResolveContractAbi.ts b/apps/dashboard/src/@/hooks/useResolveContractAbi.ts similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useResolveContractAbi.ts rename to apps/dashboard/src/@/hooks/useResolveContractAbi.ts diff --git a/apps/dashboard/src/@/lib/useShowMore.ts b/apps/dashboard/src/@/hooks/useShowMore.ts similarity index 100% rename from apps/dashboard/src/@/lib/useShowMore.ts rename to apps/dashboard/src/@/hooks/useShowMore.ts diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useSplit.ts b/apps/dashboard/src/@/hooks/useSplit.ts similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useSplit.ts rename to apps/dashboard/src/@/hooks/useSplit.ts diff --git a/apps/dashboard/src/hooks/useTxNotifications.ts b/apps/dashboard/src/@/hooks/useTxNotifications.ts similarity index 93% rename from apps/dashboard/src/hooks/useTxNotifications.ts rename to apps/dashboard/src/@/hooks/useTxNotifications.ts index 0964abc8579..8273b680b22 100644 --- a/apps/dashboard/src/hooks/useTxNotifications.ts +++ b/apps/dashboard/src/@/hooks/useTxNotifications.ts @@ -1,8 +1,8 @@ -import { useErrorHandler } from "contexts/error-handler"; import { useCallback } from "react"; import { toast } from "sonner"; import type { ThirdwebContract } from "thirdweb"; import { useInvalidateContractQuery } from "thirdweb/react"; +import { useErrorHandler } from "@/contexts/error-handler"; export function useTxNotifications( successMessage: string, diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useVote.ts b/apps/dashboard/src/@/hooks/useVote.ts similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useVote.ts rename to apps/dashboard/src/@/hooks/useVote.ts diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useWalletNFTs.ts b/apps/dashboard/src/@/hooks/useWalletNFTs.ts similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/hooks/useWalletNFTs.ts rename to apps/dashboard/src/@/hooks/useWalletNFTs.ts diff --git a/apps/dashboard/src/components/icons/ChainIcon.tsx b/apps/dashboard/src/@/icons/ChainIcon.tsx similarity index 90% rename from apps/dashboard/src/components/icons/ChainIcon.tsx rename to apps/dashboard/src/@/icons/ChainIcon.tsx index ea7dff9a9e9..ae845a75915 100644 --- a/apps/dashboard/src/components/icons/ChainIcon.tsx +++ b/apps/dashboard/src/@/icons/ChainIcon.tsx @@ -1,11 +1,11 @@ "use client"; -/* eslint-disable @next/next/no-img-element */ -import { replaceIpfsUrl } from "lib/sdk"; import type { ThirdwebClient } from "thirdweb"; import { Img } from "@/components/blocks/Img"; +/* eslint-disable @next/next/no-img-element */ +import { replaceIpfsUrl } from "@/lib/sdk"; import { cn } from "@/lib/utils"; -import { fallbackChainIcon } from "../../utils/chain-icons"; +import { fallbackChainIcon } from "@/utils/chain-icons"; type ImageProps = React.ComponentProps<"img">; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/ConnectSDKIcon.tsx b/apps/dashboard/src/@/icons/ConnectSDKIcon.tsx similarity index 100% rename from apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/ConnectSDKIcon.tsx rename to apps/dashboard/src/@/icons/ConnectSDKIcon.tsx diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/ContractIcon.tsx b/apps/dashboard/src/@/icons/ContractIcon.tsx similarity index 100% rename from apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/ContractIcon.tsx rename to apps/dashboard/src/@/icons/ContractIcon.tsx diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/EngineIcon.tsx b/apps/dashboard/src/@/icons/EngineIcon.tsx similarity index 100% rename from apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/EngineIcon.tsx rename to apps/dashboard/src/@/icons/EngineIcon.tsx diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/InsightIcon.tsx b/apps/dashboard/src/@/icons/InsightIcon.tsx similarity index 100% rename from apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/InsightIcon.tsx rename to apps/dashboard/src/@/icons/InsightIcon.tsx diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/NebulaIcon.tsx b/apps/dashboard/src/@/icons/NebulaIcon.tsx similarity index 100% rename from apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/NebulaIcon.tsx rename to apps/dashboard/src/@/icons/NebulaIcon.tsx diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/PayIcon.tsx b/apps/dashboard/src/@/icons/PayIcon.tsx similarity index 100% rename from apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/PayIcon.tsx rename to apps/dashboard/src/@/icons/PayIcon.tsx diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/RPCIcon.tsx b/apps/dashboard/src/@/icons/RPCIcon.tsx similarity index 100% rename from apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/RPCIcon.tsx rename to apps/dashboard/src/@/icons/RPCIcon.tsx diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/SmartAccountIcon.tsx b/apps/dashboard/src/@/icons/SmartAccountIcon.tsx similarity index 100% rename from apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/icons/SmartAccountIcon.tsx rename to apps/dashboard/src/@/icons/SmartAccountIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/DiscordIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/DiscordIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/DiscordIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/DiscordIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/DotNetIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/DotNetIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/DotNetIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/DotNetIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/GithubIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/GithubIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/GithubIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/GithubIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/InstagramIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/InstagramIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/InstagramIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/InstagramIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/LinkedinIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/LinkedinIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/LinkedinIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/LinkedinIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/ReactIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/ReactIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/ReactIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/ReactIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/RedditIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/RedditIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/RedditIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/RedditIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/TelegramIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/TelegramIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/TelegramIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/TelegramIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/TiktokIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/TiktokIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/TiktokIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/TiktokIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/TypeScriptIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/TypeScriptIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/TypeScriptIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/TypeScriptIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/UnityIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/UnityIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/UnityIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/UnityIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/UnrealIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/UnrealIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/UnrealIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/UnrealIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/XIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/XIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/XIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/XIcon.tsx diff --git a/apps/dashboard/src/components/icons/brand-icons/YoutubeIcon.tsx b/apps/dashboard/src/@/icons/brand-icons/YoutubeIcon.tsx similarity index 100% rename from apps/dashboard/src/components/icons/brand-icons/YoutubeIcon.tsx rename to apps/dashboard/src/@/icons/brand-icons/YoutubeIcon.tsx diff --git a/apps/dashboard/src/lib/defineDashboardChain.ts b/apps/dashboard/src/@/lib/defineDashboardChain.ts similarity index 89% rename from apps/dashboard/src/lib/defineDashboardChain.ts rename to apps/dashboard/src/@/lib/defineDashboardChain.ts index 32f01d644b5..0fbe6167418 100644 --- a/apps/dashboard/src/lib/defineDashboardChain.ts +++ b/apps/dashboard/src/@/lib/defineDashboardChain.ts @@ -1,7 +1,7 @@ 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"; +import { mapV4ChainToV5Chain } from "@/utils/map-chains"; export function defineDashboardChain( chainId: number, diff --git a/apps/dashboard/src/lib/deployment/template-values.ts b/apps/dashboard/src/@/lib/deployment/template-values.ts similarity index 96% rename from apps/dashboard/src/lib/deployment/template-values.ts rename to apps/dashboard/src/@/lib/deployment/template-values.ts index 764846bb424..1d388d8188a 100644 --- a/apps/dashboard/src/lib/deployment/template-values.ts +++ b/apps/dashboard/src/@/lib/deployment/template-values.ts @@ -1,4 +1,4 @@ -import type { SolidityType } from "lib/solidity-types"; +import type { SolidityType } from "@/types/solidity-types"; interface ReplacementProps { connectedWallet?: string; diff --git a/apps/dashboard/src/lib/ens.ts b/apps/dashboard/src/@/lib/ens.ts similarity index 100% rename from apps/dashboard/src/lib/ens.ts rename to apps/dashboard/src/@/lib/ens.ts diff --git a/apps/dashboard/src/lib/licenses.ts b/apps/dashboard/src/@/lib/licenses.ts similarity index 100% rename from apps/dashboard/src/lib/licenses.ts rename to apps/dashboard/src/@/lib/licenses.ts diff --git a/apps/dashboard/src/lib/project-showcase-constants.ts b/apps/dashboard/src/@/lib/project-showcase-constants.ts similarity index 100% rename from apps/dashboard/src/lib/project-showcase-constants.ts rename to apps/dashboard/src/@/lib/project-showcase-constants.ts diff --git a/apps/dashboard/src/lib/publisher-utils.ts b/apps/dashboard/src/@/lib/publisher-utils.ts similarity index 100% rename from apps/dashboard/src/lib/publisher-utils.ts rename to apps/dashboard/src/@/lib/publisher-utils.ts diff --git a/apps/dashboard/src/lib/redis.ts b/apps/dashboard/src/@/lib/redis.ts similarity index 100% rename from apps/dashboard/src/lib/redis.ts rename to apps/dashboard/src/@/lib/redis.ts diff --git a/apps/dashboard/src/lib/rpc.ts b/apps/dashboard/src/@/lib/rpc.ts similarity index 88% rename from apps/dashboard/src/lib/rpc.ts rename to apps/dashboard/src/@/lib/rpc.ts index 3a3ffc61bf2..28d288f3dcc 100644 --- a/apps/dashboard/src/lib/rpc.ts +++ b/apps/dashboard/src/@/lib/rpc.ts @@ -1,8 +1,8 @@ -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"; +import { defineDashboardChain } from "@/lib/defineDashboardChain"; +import { hostnameEndsWith } from "@/utils/url"; export function getDashboardChainRpc( chainId: number, diff --git a/apps/dashboard/src/lib/sdk.ts b/apps/dashboard/src/@/lib/sdk.ts similarity index 100% rename from apps/dashboard/src/lib/sdk.ts rename to apps/dashboard/src/@/lib/sdk.ts diff --git a/apps/dashboard/src/lib/search.ts b/apps/dashboard/src/@/lib/search.ts similarity index 98% rename from apps/dashboard/src/lib/search.ts rename to apps/dashboard/src/@/lib/search.ts index b9697a95dc5..b32f7697a00 100644 --- a/apps/dashboard/src/lib/search.ts +++ b/apps/dashboard/src/@/lib/search.ts @@ -1,6 +1,6 @@ -import { defineDashboardChain } from "lib/defineDashboardChain"; import { type ChainMetadata, getChainMetadata } from "thirdweb/chains"; import invariant from "tiny-invariant"; +import { defineDashboardChain } from "@/lib/defineDashboardChain"; export type TimeRange = "month" | "week" | "day"; export type SortBy = "transactionCount" | "walletCount" | "gasUsage"; diff --git a/apps/dashboard/src/lib/selectors.ts b/apps/dashboard/src/@/lib/selectors.ts similarity index 100% rename from apps/dashboard/src/lib/selectors.ts rename to apps/dashboard/src/@/lib/selectors.ts diff --git a/apps/dashboard/src/@/lib/time.ts b/apps/dashboard/src/@/lib/time.ts index c8c1045e645..f8581c0fbc5 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, getLastNDaysRange, type Range, -} from "components/analytics/date-range-selector"; -import { differenceInCalendarDays } from "date-fns"; +} from "@/components/analytics/date-range-selector"; export function normalizeTime(date: Date) { const newDate = new Date(date); diff --git a/apps/dashboard/src/lib/wallet/nfts/alchemy.ts b/apps/dashboard/src/@/lib/wallet/nfts/alchemy.ts similarity index 100% rename from apps/dashboard/src/lib/wallet/nfts/alchemy.ts rename to apps/dashboard/src/@/lib/wallet/nfts/alchemy.ts diff --git a/apps/dashboard/src/lib/wallet/nfts/isAlchemySupported.ts b/apps/dashboard/src/@/lib/wallet/nfts/isAlchemySupported.ts similarity index 100% rename from apps/dashboard/src/lib/wallet/nfts/isAlchemySupported.ts rename to apps/dashboard/src/@/lib/wallet/nfts/isAlchemySupported.ts diff --git a/apps/dashboard/src/lib/wallet/nfts/isMoralisSupported.ts b/apps/dashboard/src/@/lib/wallet/nfts/isMoralisSupported.ts similarity index 100% rename from apps/dashboard/src/lib/wallet/nfts/isMoralisSupported.ts rename to apps/dashboard/src/@/lib/wallet/nfts/isMoralisSupported.ts diff --git a/apps/dashboard/src/lib/wallet/nfts/moralis.ts b/apps/dashboard/src/@/lib/wallet/nfts/moralis.ts similarity index 100% rename from apps/dashboard/src/lib/wallet/nfts/moralis.ts rename to apps/dashboard/src/@/lib/wallet/nfts/moralis.ts diff --git a/apps/dashboard/src/lib/wallet/nfts/tokenUri.ts b/apps/dashboard/src/@/lib/wallet/nfts/tokenUri.ts similarity index 100% rename from apps/dashboard/src/lib/wallet/nfts/tokenUri.ts rename to apps/dashboard/src/@/lib/wallet/nfts/tokenUri.ts diff --git a/apps/dashboard/src/lib/wallet/nfts/types.ts b/apps/dashboard/src/@/lib/wallet/nfts/types.ts similarity index 100% rename from apps/dashboard/src/lib/wallet/nfts/types.ts rename to apps/dashboard/src/@/lib/wallet/nfts/types.ts diff --git a/apps/dashboard/src/@3rdweb-sdk/react/cache-keys.ts b/apps/dashboard/src/@/query-keys/cache-keys.ts similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/react/cache-keys.ts rename to apps/dashboard/src/@/query-keys/cache-keys.ts diff --git a/apps/dashboard/src/constants/schemas.ts b/apps/dashboard/src/@/schema/schemas.ts similarity index 98% rename from apps/dashboard/src/constants/schemas.ts rename to apps/dashboard/src/@/schema/schemas.ts index 0213d852c84..269d4065598 100644 --- a/apps/dashboard/src/constants/schemas.ts +++ b/apps/dashboard/src/@/schema/schemas.ts @@ -1,8 +1,8 @@ -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"; +import { resolveEns } from "@/lib/ens"; /** * This file contains some useful zod schemas from the SDK v4 diff --git a/apps/dashboard/src/components/settings/ApiKeys/validations.ts b/apps/dashboard/src/@/schema/validations.ts similarity index 97% rename from apps/dashboard/src/components/settings/ApiKeys/validations.ts rename to apps/dashboard/src/@/schema/validations.ts index 17c89dd5a31..7ea6ca838d5 100644 --- a/apps/dashboard/src/components/settings/ApiKeys/validations.ts +++ b/apps/dashboard/src/@/schema/validations.ts @@ -1,7 +1,7 @@ import { isAddress } from "thirdweb"; -import { RE_DOMAIN } from "utils/regex"; -import { validStrList } from "utils/validations"; import { z } from "zod"; +import { RE_DOMAIN } from "@/utils/regex"; +import { validStrList } from "@/utils/validations"; export const projectNameSchema = z .string() diff --git a/apps/dashboard/src/stores/SyncStoreToCookies.tsx b/apps/dashboard/src/@/stores/SyncStoreToCookies.tsx similarity index 95% rename from apps/dashboard/src/stores/SyncStoreToCookies.tsx rename to apps/dashboard/src/@/stores/SyncStoreToCookies.tsx index 4f82b1e5381..28f660d911a 100644 --- a/apps/dashboard/src/stores/SyncStoreToCookies.tsx +++ b/apps/dashboard/src/@/stores/SyncStoreToCookies.tsx @@ -1,6 +1,6 @@ import { useEffect } from "react"; import { type Store, useStore } from "@/lib/reactive"; -import { getCookie, setCookie } from "../lib/cookie"; +import { getCookie, setCookie } from "@/utils/cookie"; const loadedStoreKeys = new Set(); diff --git a/apps/dashboard/src/stores/chainStores.tsx b/apps/dashboard/src/@/stores/chainStores.tsx similarity index 100% rename from apps/dashboard/src/stores/chainStores.tsx rename to apps/dashboard/src/@/stores/chainStores.tsx diff --git a/apps/dashboard/src/stores/storageKeys.ts b/apps/dashboard/src/@/stores/storageKeys.ts similarity index 100% rename from apps/dashboard/src/stores/storageKeys.ts rename to apps/dashboard/src/@/stores/storageKeys.ts diff --git a/apps/dashboard/src/stories/stubs.ts b/apps/dashboard/src/@/storybook/stubs.ts similarity index 84% rename from apps/dashboard/src/stories/stubs.ts rename to apps/dashboard/src/@/storybook/stubs.ts index 455529a0234..0d02432b5a8 100644 --- a/apps/dashboard/src/stories/stubs.ts +++ b/apps/dashboard/src/@/storybook/stubs.ts @@ -1,12 +1,7 @@ -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; -import type { - EngineAlert, - EngineAlertRule, - EngineNotificationChannel, -} from "@3rdweb-sdk/react/hooks/useEngine"; import type { Project } from "@/api/projects"; import type { Team } from "@/api/team"; import type { TeamSubscription } from "@/api/team-subscription"; +import type { Account } from "@/hooks/useApi"; export function projectStub(id: string, teamId: string) { const project: Project = { @@ -153,51 +148,6 @@ export const teamsAndProjectsStub: Array<{ team: Team; projects: Project[] }> = }, ]; -export function createEngineAlertRuleStub( - id: string, - overrides: Partial = {}, -): EngineAlertRule { - return { - createdAt: new Date(), - description: `This is a description for alert rule ${id}`, - id: `alert-rule-${id}`, - pausedAt: null, - routingKey: `alert.${id}`, - title: `Alert Rule ${id}`, - ...overrides, - }; -} - -export function createEngineNotificationChannelStub( - id: string, - overrides: Partial = {}, -): EngineNotificationChannel { - return { - createdAt: new Date(), - id: Math.random().toString(), - pausedAt: new Date(), - subscriptionRoutes: [`alert.${id}`], - type: "slack", - value: - "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX", - ...overrides, - }; -} - -export function createEngineAlertStub( - id: string, - overrides: Partial = {}, -): EngineAlert { - return { - alertRuleId: `alert-rule-${id}`, - endsAt: new Date(), - id: Math.random().toString(), - startsAt: new Date(), - status: "pending", - ...overrides, - }; -} - export function teamSubscriptionsStub( plan: "plan:starter" | "plan:growth" | "plan:custom", overrides?: { diff --git a/apps/dashboard/src/@/storybook/stubs/engine.ts b/apps/dashboard/src/@/storybook/stubs/engine.ts new file mode 100644 index 00000000000..d6b78bdcc70 --- /dev/null +++ b/apps/dashboard/src/@/storybook/stubs/engine.ts @@ -0,0 +1,50 @@ +import type { + EngineAlert, + EngineAlertRule, + EngineNotificationChannel, +} from "@/hooks/useEngine"; + +export function createEngineAlertRuleStub( + id: string, + overrides: Partial = {}, +): EngineAlertRule { + return { + createdAt: new Date(), + description: `This is a description for alert rule ${id}`, + id: `alert-rule-${id}`, + pausedAt: null, + routingKey: `alert.${id}`, + title: `Alert Rule ${id}`, + ...overrides, + }; +} + +export function createEngineNotificationChannelStub( + id: string, + overrides: Partial = {}, +): EngineNotificationChannel { + return { + createdAt: new Date(), + id: Math.random().toString(), + pausedAt: new Date(), + subscriptionRoutes: [`alert.${id}`], + type: "slack", + value: + "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX", + ...overrides, + }; +} + +export function createEngineAlertStub( + id: string, + overrides: Partial = {}, +): EngineAlert { + return { + alertRuleId: `alert-rule-${id}`, + endsAt: new Date(), + id: Math.random().toString(), + startsAt: new Date(), + status: "pending", + ...overrides, + }; +} diff --git a/apps/dashboard/src/stories/utils.tsx b/apps/dashboard/src/@/storybook/utils.tsx similarity index 100% rename from apps/dashboard/src/stories/utils.tsx rename to apps/dashboard/src/@/storybook/utils.tsx diff --git a/apps/dashboard/src/components/buttons/ExtensionDetectedState.ts b/apps/dashboard/src/@/types/ExtensionDetectedState.ts similarity index 100% rename from apps/dashboard/src/components/buttons/ExtensionDetectedState.ts rename to apps/dashboard/src/@/types/ExtensionDetectedState.ts diff --git a/apps/dashboard/src/types/analytics.ts b/apps/dashboard/src/@/types/analytics.ts similarity index 100% rename from apps/dashboard/src/types/analytics.ts rename to apps/dashboard/src/@/types/analytics.ts diff --git a/apps/dashboard/src/@/lib/billing.ts b/apps/dashboard/src/@/types/billing.ts similarity index 100% rename from apps/dashboard/src/@/lib/billing.ts rename to apps/dashboard/src/@/types/billing.ts diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/types/chain.ts b/apps/dashboard/src/@/types/chain.ts similarity index 100% rename from apps/dashboard/src/app/(app)/(dashboard)/(chain)/types/chain.ts rename to apps/dashboard/src/@/types/chain.ts diff --git a/apps/dashboard/src/types/component-with-children.d.ts b/apps/dashboard/src/@/types/component-with-children.ts similarity index 100% rename from apps/dashboard/src/types/component-with-children.d.ts rename to apps/dashboard/src/@/types/component-with-children.ts diff --git a/apps/dashboard/src/constants/contracts.ts b/apps/dashboard/src/@/types/contracts.ts similarity index 100% rename from apps/dashboard/src/constants/contracts.ts rename to apps/dashboard/src/@/types/contracts.ts diff --git a/apps/dashboard/src/types/modified-types.d.ts b/apps/dashboard/src/@/types/modified-types.ts similarity index 100% rename from apps/dashboard/src/types/modified-types.d.ts rename to apps/dashboard/src/@/types/modified-types.ts diff --git a/apps/dashboard/src/lib/solidity-types.ts b/apps/dashboard/src/@/types/solidity-types.ts similarity index 100% rename from apps/dashboard/src/lib/solidity-types.ts rename to apps/dashboard/src/@/types/solidity-types.ts diff --git a/apps/dashboard/src/lib/address-utils.ts b/apps/dashboard/src/@/utils/address-utils.ts similarity index 100% rename from apps/dashboard/src/lib/address-utils.ts rename to apps/dashboard/src/@/utils/address-utils.ts diff --git a/apps/dashboard/src/utils/batch.ts b/apps/dashboard/src/@/utils/batch.ts similarity index 99% rename from apps/dashboard/src/utils/batch.ts rename to apps/dashboard/src/@/utils/batch.ts index 430642de0c9..565500992dc 100644 --- a/apps/dashboard/src/utils/batch.ts +++ b/apps/dashboard/src/@/utils/batch.ts @@ -1,6 +1,6 @@ import Papa from "papaparse"; import type { NFTInput } from "thirdweb/utils"; -import { removeEmptyValues } from "./parseAttributes"; +import { removeEmptyValues } from "@/utils/parseAttributes"; interface CSVData extends Record { name: string; diff --git a/apps/dashboard/src/utils/chain-icons.ts b/apps/dashboard/src/@/utils/chain-icons.ts similarity index 100% rename from apps/dashboard/src/utils/chain-icons.ts rename to apps/dashboard/src/@/utils/chain-icons.ts diff --git a/apps/dashboard/src/lib/cookie.ts b/apps/dashboard/src/@/utils/cookie.ts similarity index 100% rename from apps/dashboard/src/lib/cookie.ts rename to apps/dashboard/src/@/utils/cookie.ts diff --git a/apps/dashboard/src/utils/date-utils.ts b/apps/dashboard/src/@/utils/date-utils.ts similarity index 100% rename from apps/dashboard/src/utils/date-utils.ts rename to apps/dashboard/src/@/utils/date-utils.ts diff --git a/apps/dashboard/src/utils/errorParser.tsx b/apps/dashboard/src/@/utils/errorParser.tsx similarity index 100% rename from apps/dashboard/src/utils/errorParser.tsx rename to apps/dashboard/src/@/utils/errorParser.tsx diff --git a/apps/dashboard/src/utils/fetchChain.ts b/apps/dashboard/src/@/utils/fetchChain.ts similarity index 100% rename from apps/dashboard/src/utils/fetchChain.ts rename to apps/dashboard/src/@/utils/fetchChain.ts diff --git a/apps/dashboard/src/utils/fetchChainWithLocalOverrides.ts b/apps/dashboard/src/@/utils/fetchChainWithLocalOverrides.ts similarity index 93% rename from apps/dashboard/src/utils/fetchChainWithLocalOverrides.ts rename to apps/dashboard/src/@/utils/fetchChainWithLocalOverrides.ts index b3559008ab5..714ed7b3dba 100644 --- a/apps/dashboard/src/utils/fetchChainWithLocalOverrides.ts +++ b/apps/dashboard/src/@/utils/fetchChainWithLocalOverrides.ts @@ -2,7 +2,7 @@ import "server-only"; import { cookies } from "next/headers"; import type { ChainMetadata } from "thirdweb/chains"; -import { TW_LOCAL_CHAIN_STORE } from "../stores/storageKeys"; +import { TW_LOCAL_CHAIN_STORE } from "@/stores/storageKeys"; import { fetchChain } from "./fetchChain"; export async function fetchChainWithLocalOverrides( diff --git a/apps/dashboard/src/lib/format-utils.ts b/apps/dashboard/src/@/utils/format-utils.ts similarity index 100% rename from apps/dashboard/src/lib/format-utils.ts rename to apps/dashboard/src/@/utils/format-utils.ts diff --git a/apps/dashboard/src/app/(app)/team/components/TeamHeader/getValidTeamPlan.tsx b/apps/dashboard/src/@/utils/getValidTeamPlan.tsx similarity index 100% rename from apps/dashboard/src/app/(app)/team/components/TeamHeader/getValidTeamPlan.tsx rename to apps/dashboard/src/@/utils/getValidTeamPlan.tsx diff --git a/apps/dashboard/src/utils/helper.ts b/apps/dashboard/src/@/utils/helper.ts similarity index 100% rename from apps/dashboard/src/utils/helper.ts rename to apps/dashboard/src/@/utils/helper.ts diff --git a/apps/dashboard/src/utils/isBrowser.ts b/apps/dashboard/src/@/utils/isBrowser.ts similarity index 100% rename from apps/dashboard/src/utils/isBrowser.ts rename to apps/dashboard/src/@/utils/isBrowser.ts diff --git a/apps/dashboard/src/contexts/map-chains.tsx b/apps/dashboard/src/@/utils/map-chains.tsx similarity index 92% rename from apps/dashboard/src/contexts/map-chains.tsx rename to apps/dashboard/src/@/utils/map-chains.tsx index 8751271f0da..f813a3f2447 100644 --- a/apps/dashboard/src/contexts/map-chains.tsx +++ b/apps/dashboard/src/@/utils/map-chains.tsx @@ -1,5 +1,5 @@ import { type Chain, defineChain } from "thirdweb"; -import type { StoredChain } from "../stores/chainStores"; +import type { StoredChain } from "@/stores/chainStores"; export function mapV4ChainToV5Chain(v4Chain: StoredChain) { const chain: Chain = { diff --git a/apps/dashboard/src/utils/number.ts b/apps/dashboard/src/@/utils/number.ts similarity index 100% rename from apps/dashboard/src/utils/number.ts rename to apps/dashboard/src/@/utils/number.ts diff --git a/apps/dashboard/src/utils/object.ts b/apps/dashboard/src/@/utils/object.ts similarity index 100% rename from apps/dashboard/src/utils/object.ts rename to apps/dashboard/src/@/utils/object.ts diff --git a/apps/dashboard/src/utils/parseAttributes.ts b/apps/dashboard/src/@/utils/parseAttributes.ts similarity index 100% rename from apps/dashboard/src/utils/parseAttributes.ts rename to apps/dashboard/src/@/utils/parseAttributes.ts diff --git a/apps/dashboard/src/utils/pollWithTimeout.ts b/apps/dashboard/src/@/utils/pollWithTimeout.ts similarity index 100% rename from apps/dashboard/src/utils/pollWithTimeout.ts rename to apps/dashboard/src/@/utils/pollWithTimeout.ts diff --git a/apps/dashboard/src/utils/pricing.tsx b/apps/dashboard/src/@/utils/pricing.tsx similarity index 100% rename from apps/dashboard/src/utils/pricing.tsx rename to apps/dashboard/src/@/utils/pricing.tsx diff --git a/apps/dashboard/src/utils/regex.ts b/apps/dashboard/src/@/utils/regex.ts similarity index 100% rename from apps/dashboard/src/utils/regex.ts rename to apps/dashboard/src/@/utils/regex.ts diff --git a/apps/dashboard/src/@/lib/resolveSchemeWithErrorHandler.ts b/apps/dashboard/src/@/utils/resolveSchemeWithErrorHandler.ts similarity index 100% rename from apps/dashboard/src/@/lib/resolveSchemeWithErrorHandler.ts rename to apps/dashboard/src/@/utils/resolveSchemeWithErrorHandler.ts diff --git a/apps/dashboard/src/app/(app)/components/sdk-component-theme.ts b/apps/dashboard/src/@/utils/sdk-component-theme.ts similarity index 100% rename from apps/dashboard/src/app/(app)/components/sdk-component-theme.ts rename to apps/dashboard/src/@/utils/sdk-component-theme.ts diff --git a/apps/dashboard/src/@/lib/shareLink.ts b/apps/dashboard/src/@/utils/shareLink.ts similarity index 100% rename from apps/dashboard/src/@/lib/shareLink.ts rename to apps/dashboard/src/@/utils/shareLink.ts diff --git a/apps/dashboard/src/utils/string.ts b/apps/dashboard/src/@/utils/string.ts similarity index 100% rename from apps/dashboard/src/utils/string.ts rename to apps/dashboard/src/@/utils/string.ts diff --git a/apps/dashboard/src/app/(app)/(stripe)/utils/build-url.ts b/apps/dashboard/src/@/utils/stripe/build-url.ts similarity index 88% rename from apps/dashboard/src/app/(app)/(stripe)/utils/build-url.ts rename to apps/dashboard/src/@/utils/stripe/build-url.ts index 2afd9f894e5..9debf52257e 100644 --- a/apps/dashboard/src/app/(app)/(stripe)/utils/build-url.ts +++ b/apps/dashboard/src/@/utils/stripe/build-url.ts @@ -1,4 +1,4 @@ -import type { ProductSKU } from "@/lib/billing"; +import type { ProductSKU } from "@/types/billing"; export function buildCheckoutUrl(options: { sku: Exclude; diff --git a/apps/dashboard/src/utils/try-catch.ts b/apps/dashboard/src/@/utils/try-catch.ts similarity index 100% rename from apps/dashboard/src/utils/try-catch.ts rename to apps/dashboard/src/@/utils/try-catch.ts diff --git a/apps/dashboard/src/utils/url.ts b/apps/dashboard/src/@/utils/url.ts similarity index 100% rename from apps/dashboard/src/utils/url.ts rename to apps/dashboard/src/@/utils/url.ts diff --git a/apps/dashboard/src/utils/usedapp-external.ts b/apps/dashboard/src/@/utils/usedapp-external.ts similarity index 87% rename from apps/dashboard/src/utils/usedapp-external.ts rename to apps/dashboard/src/@/utils/usedapp-external.ts index c123f95260a..2484c094aa8 100644 --- a/apps/dashboard/src/utils/usedapp-external.ts +++ b/apps/dashboard/src/@/utils/usedapp-external.ts @@ -1,4 +1,4 @@ -import { isPossibleEVMAddress } from "lib/address-utils"; +import { isPossibleEVMAddress } from "@/utils/address-utils"; export function shortenString(str: string, extraShort = true) { return `${str.substring(0, extraShort ? 4 : 6)}...${str.substring( diff --git a/apps/dashboard/src/utils/validations.ts b/apps/dashboard/src/@/utils/validations.ts similarity index 100% rename from apps/dashboard/src/utils/validations.ts rename to apps/dashboard/src/@/utils/validations.ts diff --git a/apps/dashboard/src/lib/vercel-utils.ts b/apps/dashboard/src/@/utils/vercel.ts similarity index 95% rename from apps/dashboard/src/lib/vercel-utils.ts rename to apps/dashboard/src/@/utils/vercel.ts index 01a0a0f74fe..c3da69fe95e 100644 --- a/apps/dashboard/src/lib/vercel-utils.ts +++ b/apps/dashboard/src/@/utils/vercel.ts @@ -1,4 +1,4 @@ -import { isBrowser } from "utils/isBrowser"; +import { isBrowser } from "@/utils/isBrowser"; export function isVercel() { return !!(process.env.vercel || process.env.NEXT_PUBLIC_VERCEL_ENV); diff --git a/apps/dashboard/src/utils/zeroAddress.ts b/apps/dashboard/src/@/utils/zeroAddress.ts similarity index 100% rename from apps/dashboard/src/utils/zeroAddress.ts rename to apps/dashboard/src/@/utils/zeroAddress.ts diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/index.ts b/apps/dashboard/src/@3rdweb-sdk/react/hooks/index.ts deleted file mode 100644 index 52e0e1029e5..00000000000 --- a/apps/dashboard/src/@3rdweb-sdk/react/hooks/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./useActiveChainId"; -export * from "./useWalletNFTs"; diff --git a/apps/dashboard/src/@3rdweb-sdk/react/index.ts b/apps/dashboard/src/@3rdweb-sdk/react/index.ts deleted file mode 100644 index 6c043fd9877..00000000000 --- a/apps/dashboard/src/@3rdweb-sdk/react/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./cache-keys"; -export * from "./hooks"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/pagination.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/pagination.tsx index 019b21bfb80..dd036009634 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/pagination.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/pagination.tsx @@ -2,7 +2,7 @@ import { usePathname, useSearchParams } from "next/navigation"; import { useCallback } from "react"; -import { PaginationButtons } from "@/components/pagination-buttons"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; import { useDashboardRouter } from "@/lib/DashboardRouter"; type ChainlistPaginationProps = { 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 4d09e36f93e..9e0627c9bb3 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 @@ -2,7 +2,7 @@ import { defineChain } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; import { Card, CardContent, CardHeader } from "@/components/ui/card"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; type RouteListCardProps = { originChainId: number; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-row.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-row.tsx index a005242aca0..3eb209216a7 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-row.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-row.tsx @@ -2,7 +2,7 @@ import { defineChain, getChainMetadata } from "thirdweb/chains"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { TableCell, TableRow } from "@/components/ui/table"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; type RouteListRowProps = { originChainId: number; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/page.tsx index ec642a24722..d7b9d07a96a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/page.tsx @@ -1,7 +1,7 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { ArrowUpRightIcon } from "lucide-react"; import type { Metadata } from "next"; import { headers } from "next/headers"; +import { getAuthToken } from "@/api/auth-token"; import { SearchInput } from "./components/client/search"; import { QueryType } from "./components/client/type"; import { RouteListView } from "./components/client/view"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx index 40a66801e43..1ae4f4a0bb9 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx @@ -1,10 +1,8 @@ "use client"; -import { CustomConnectWallet } from "@3rdweb-sdk/react/components/connect-wallet"; import { zodResolver } from "@hookform/resolvers/zod"; import { Turnstile } from "@marsidev/react-turnstile"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import type { CanClaimResponseType } from "app/(app)/api/testnet-faucet/can-claim/CanClaimResponseType"; -import { mapV4ChainToV5Chain } from "contexts/map-chains"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { useForm } from "react-hook-form"; @@ -23,9 +21,9 @@ import { useSwitchActiveWalletChain, useWalletBalance, } from "thirdweb/react"; -import { parseError } from "utils/errorParser"; import { z } from "zod"; import { reportFaucetUsed } from "@/analytics/report"; +import { CustomConnectWallet } from "@/components/connect-wallet"; import { Button } from "@/components/ui/button"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { @@ -50,6 +48,8 @@ import { NEXT_PUBLIC_THIRDWEB_ENGINE_FAUCET_WALLET, NEXT_PUBLIC_TURNSTILE_SITE_KEY, } from "@/constants/public-envs"; +import { parseError } from "@/utils/errorParser"; +import { mapV4ChainToV5Chain } from "@/utils/map-chains"; function formatTime(seconds: number) { const rtf = new Intl.RelativeTimeFormat("en", { numeric: "auto" }); diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/PayModal.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/PayModal.tsx index bf116bc4217..890519d706b 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/PayModal.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/PayModal.tsx @@ -1,11 +1,11 @@ "use client"; -import { defineDashboardChain } from "lib/defineDashboardChain"; import { useTheme } from "next-themes"; import type { ThirdwebClient } from "thirdweb"; import { PayEmbed } from "thirdweb/react"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog"; -import { getSDKTheme } from "../../../../../../components/sdk-component-theme"; +import { defineDashboardChain } from "@/lib/defineDashboardChain"; +import { getSDKTheme } from "../../../../../../../../@/utils/sdk-component-theme"; export function PayModalButton(props: { chainId: number; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/add-chain-to-wallet.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/add-chain-to-wallet.tsx index fd308a218a9..25215865bf8 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/add-chain-to-wallet.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/add-chain-to-wallet.tsx @@ -1,6 +1,5 @@ "use client"; -import { useCustomConnectModal } from "@3rdweb-sdk/react/components/connect-wallet"; import { useMutation } from "@tanstack/react-query"; import { toast } from "sonner"; import type { Chain, ThirdwebClient } from "thirdweb"; @@ -10,6 +9,7 @@ import { useSwitchActiveWalletChain, } from "thirdweb/react"; import { useDebounce } from "use-debounce"; +import { useCustomConnectModal } from "@/components/connect-wallet"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { ToolTipLabel } from "@/components/ui/tooltip"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/live-stats.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/live-stats.tsx index 9b13408f9fc..7199c3145ff 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/live-stats.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/live-stats.tsx @@ -2,12 +2,12 @@ import { useQuery } from "@tanstack/react-query"; import { CircleCheckIcon, XIcon } from "lucide-react"; -import { hostnameEndsWith } from "utils/url"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { Skeleton } from "@/components/ui/skeleton"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { isProd } from "@/constants/env-utils"; import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; +import { hostnameEndsWith } from "@/utils/url"; import { PrimaryInfoItem } from "../server/primary-info-item"; function useChainStatswithRPC(_rpcUrl: string) { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/SupportedProductsSection.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/SupportedProductsSection.tsx index 11fd5ccae53..5ba10320dab 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/SupportedProductsSection.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/SupportedProductsSection.tsx @@ -1,7 +1,7 @@ import { CircleCheckIcon } from "lucide-react"; import Link from "next/link"; +import type { ChainMetadataWithServices } from "@/types/chain"; import { products } from "../../../../components/server/products"; -import type { ChainMetadataWithServices } from "../../../../types/chain"; import { SectionTitle } from "./SectionTitle"; export function SupportedProductsSection(props: { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/chain-header.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/chain-header.tsx index fa9a49c909c..ae4f4440243 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/chain-header.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/chain-header.tsx @@ -3,7 +3,7 @@ import type { ThirdwebClient } from "thirdweb"; import type { ChainMetadata } from "thirdweb/chains"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; -import { mapV4ChainToV5Chain } from "../../../../../../../../contexts/map-chains"; +import { mapV4ChainToV5Chain } from "../../../../../../../../@/utils/map-chains"; import { ChainIcon } from "../../../../components/server/chain-icon"; import { AddChainToWallet } from "../client/add-chain-to-wallet"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/explorer-section.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/explorer-section.tsx index 3c6049c8ff6..ab4ac73dcd2 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/explorer-section.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/explorer-section.tsx @@ -1,6 +1,6 @@ import { ExternalLinkIcon } from "lucide-react"; import Link from "next/link"; -import type { ChainMetadataWithServices } from "../../../../types/chain"; +import type { ChainMetadataWithServices } from "@/types/chain"; import { SectionTitle } from "./SectionTitle"; export function ExplorersSection(props: { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx index 40dbd464f00..5e91690c8d0 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx @@ -1,8 +1,8 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { ChevronDownIcon, TicketCheckIcon } from "lucide-react"; import type { Metadata } from "next"; import Link from "next/link"; import { redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { Breadcrumb, BreadcrumbItem, @@ -19,7 +19,7 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { mapV4ChainToV5Chain } from "../../../../../../contexts/map-chains"; +import { mapV4ChainToV5Chain } from "../../../../../../@/utils/map-chains"; import { TeamHeader } from "../../../../team/components/TeamHeader/team-header"; import { StarButton } from "../../components/client/star-button"; import { getChain, getChainMetadata } from "../../utils"; 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 b016ed308af..95dfb9cfae2 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,8 +1,8 @@ import { ImageResponse } from "next/og"; import { useId } from "react"; import { download } from "thirdweb/storage"; -import { fetchChain } from "utils/fetchChain"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; +import { fetchChain } from "@/utils/fetchChain"; // Route segment config export const runtime = "edge"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/cancel-tab.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/cancel-tab.tsx index a9ed442bda0..246dbf77ba8 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/cancel-tab.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/cancel-tab.tsx @@ -1,9 +1,9 @@ "use client"; -import { TransactionButton } from "components/buttons/TransactionButton"; import { toast } from "sonner"; import type { ThirdwebContract } from "thirdweb"; import { cancelAuction, cancelListing } from "thirdweb/extensions/marketplace"; import { useSendAndConfirmTransaction } from "thirdweb/react"; +import { TransactionButton } from "@/components/tx-button"; interface CancelTabProps { id: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-button.tsx index 7e9b9839d5a..8cf7f8eab0d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-button.tsx @@ -1,12 +1,10 @@ "use client"; -import { ListerOnly } from "@3rdweb-sdk/react/components/roles/lister-only"; -import { isAlchemySupported } from "lib/wallet/nfts/isAlchemySupported"; -import { isMoralisSupported } from "lib/wallet/nfts/isMoralisSupported"; import { PlusIcon } from "lucide-react"; import { useState } from "react"; import type { ThirdwebContract } from "thirdweb"; import { useActiveAccount } from "thirdweb/react"; +import { ListerOnly } from "@/components/contracts/roles/lister-only"; import { Button } from "@/components/ui/button"; import { Sheet, @@ -16,6 +14,8 @@ import { SheetTrigger, } from "@/components/ui/sheet"; import { TabButtons } from "@/components/ui/tabs"; +import { isAlchemySupported } from "@/lib/wallet/nfts/isAlchemySupported"; +import { isMoralisSupported } from "@/lib/wallet/nfts/isMoralisSupported"; import { CreateListingsForm } from "./list-form"; interface CreateListingButtonProps { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx index 44efde22947..a222cc789f7 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx @@ -1,5 +1,3 @@ -import { useDashboardOwnedNFTs } from "@3rdweb-sdk/react/hooks/useDashboardOwnedNFTs"; -import { useWalletNFTs } from "@3rdweb-sdk/react/hooks/useWalletNFTs"; import { Box, Flex, @@ -9,13 +7,7 @@ import { Spinner, Tooltip, } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { CurrencySelector } from "components/shared/CurrencySelector"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; -import { useTxNotifications } from "hooks/useTxNotifications"; -import { isAlchemySupported } from "lib/wallet/nfts/isAlchemySupported"; -import { isMoralisSupported } from "lib/wallet/nfts/isMoralisSupported"; -import type { WalletNFT } from "lib/wallet/nfts/types"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; import { CircleAlertIcon, InfoIcon } from "lucide-react"; import Link from "next/link"; import { type Dispatch, type SetStateAction, useMemo, useState } from "react"; @@ -48,12 +40,20 @@ import type { import { createAuction, createListing } from "thirdweb/extensions/marketplace"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; import { shortenAddress } from "thirdweb/utils"; -import { FormErrorMessage, FormHelperText, FormLabel } from "tw-components"; -import { NFTMediaWithEmptyState } from "tw-components/nft-media"; -import { shortenIfAddress } from "utils/usedapp-external"; +import { CurrencySelector } from "@/components/blocks/CurrencySelector"; +import { NFTMediaWithEmptyState } from "@/components/blocks/nft-media"; +import { SolidityInput } from "@/components/solidity-inputs"; +import { TransactionButton } from "@/components/tx-button"; import { Alert, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Card } from "@/components/ui/card"; +import { useDashboardOwnedNFTs } from "@/hooks/useDashboardOwnedNFTs"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { useWalletNFTs } from "@/hooks/useWalletNFTs"; +import { isAlchemySupported } from "@/lib/wallet/nfts/isAlchemySupported"; +import { isMoralisSupported } from "@/lib/wallet/nfts/isMoralisSupported"; +import type { WalletNFT } from "@/lib/wallet/nfts/types"; +import { shortenIfAddress } from "@/utils/usedapp-external"; const LIST_FORM_ID = "marketplace-list-form"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/listing-drawer.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/listing-drawer.tsx index 06a7456b02c..b660f175a73 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/listing-drawer.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/listing-drawer.tsx @@ -6,7 +6,7 @@ import type { EnglishAuction, } from "thirdweb/extensions/marketplace"; import { BuyDirectListingButton, useActiveAccount } from "thirdweb/react"; -import { NFTMediaWithEmptyState } from "tw-components/nft-media"; +import { NFTMediaWithEmptyState } from "@/components/blocks/nft-media"; import { WalletAddress } from "@/components/blocks/wallet-address"; import { Badge } from "@/components/ui/badge"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/marketplace-table.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/marketplace-table.tsx index ca406bd9446..ca6cac2b2de 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/marketplace-table.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/marketplace-table.tsx @@ -15,7 +15,6 @@ import { usePrevious, } from "@chakra-ui/react"; import type { UseQueryResult } from "@tanstack/react-query"; -import { MediaCell } from "components/contract-pages/table/table-columns/cells/media-cell"; import { ChevronFirstIcon, ChevronLastIcon, @@ -38,6 +37,7 @@ import type { } from "thirdweb/extensions/marketplace"; import { min } from "thirdweb/utils"; import { WalletAddress } from "@/components/blocks/wallet-address"; +import { MediaCell } from "@/components/contracts/media-cell"; import { Button } from "@/components/ui/button"; import { ListingDrawer } from "./listing-drawer"; import { LISTING_STATUS } from "./types"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/NFTCards.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/NFTCards.tsx index e96a5755e3b..b8e081b557d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/NFTCards.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/NFTCards.tsx @@ -1,7 +1,7 @@ import Link from "next/link"; import { useMemo } from "react"; import { type NFT, type ThirdwebClient, ZERO_ADDRESS } from "thirdweb"; -import { NFTMediaWithEmptyState } from "tw-components/nft-media"; +import { NFTMediaWithEmptyState } from "@/components/blocks/nft-media"; import { SkeletonContainer } from "@/components/ui/skeleton"; import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../_utils/contract-page-path"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/Inputs/ClaimPriceInput.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/Inputs/ClaimPriceInput.tsx index a2e7ee67e16..ff2a74a28ad 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/Inputs/ClaimPriceInput.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/Inputs/ClaimPriceInput.tsx @@ -1,6 +1,6 @@ import { Box, Flex } from "@chakra-ui/react"; -import { CurrencySelector } from "components/shared/CurrencySelector"; import { NATIVE_TOKEN_ADDRESS } from "thirdweb"; +import { CurrencySelector } from "@/components/blocks/CurrencySelector"; import { PriceInput } from "../../price-input"; import { useClaimConditionsFormContext } from ".."; import { CustomFormControl } from "../common"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/Inputs/PhaseStartTimeInput.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/Inputs/PhaseStartTimeInput.tsx index 9d959b87cde..f5abb36f93e 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/Inputs/PhaseStartTimeInput.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/Inputs/PhaseStartTimeInput.tsx @@ -1,5 +1,5 @@ import { Input } from "@chakra-ui/react"; -import { toDateTimeLocal } from "utils/date-utils"; +import { toDateTimeLocal } from "@/utils/date-utils"; import { CustomFormControl } from "../common"; import { useClaimConditionsFormContext } from "../index"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/common.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/common.tsx index edeebd7b604..3ca2568a5f1 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/common.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/common.tsx @@ -1,7 +1,7 @@ import { Flex, FormControl } from "@chakra-ui/react"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; import type { FieldError } from "react-hook-form"; -import { FormErrorMessage, FormHelperText, FormLabel } from "tw-components"; -import type { ComponentWithChildren } from "types/component-with-children"; +import type { ComponentWithChildren } from "@/types/component-with-children"; import { useClaimConditionsFormContext } from "."; interface CustomFormControlProps { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx index 766d6de563f..2f425175ea6 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx @@ -1,7 +1,5 @@ "use client"; -import { AdminOnly } from "@3rdweb-sdk/react/components/roles/admin-only"; -import { useIsAdmin } from "@3rdweb-sdk/react/hooks/useContractRoles"; import { Alert, AlertDescription, @@ -14,8 +12,9 @@ import { MenuItem, MenuList, } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { CircleHelpIcon, PlusIcon } from "lucide-react"; import { createContext, Fragment, useContext, useMemo, useState } from "react"; import { @@ -37,11 +36,14 @@ import { useSendAndConfirmTransaction, } from "thirdweb/react"; import invariant from "tiny-invariant"; -import { Button, Heading, Text } from "tw-components"; import * as z from "zod"; import { ZodError } from "zod"; +import { AdminOnly } from "@/components/contracts/roles/admin-only"; +import { TransactionButton } from "@/components/tx-button"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useIsAdmin } from "@/hooks/useContractRoles"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import { type ClaimConditionInput, ClaimConditionInputSchema, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/phase.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/phase.tsx index 51d6af09ddb..9b6ffce6500 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/phase.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/phase.tsx @@ -1,6 +1,6 @@ -import { AdminOnly } from "@3rdweb-sdk/react/components/roles/admin-only"; import { ChevronDownIcon, ChevronUpIcon, XIcon } from "lucide-react"; import type { ThirdwebContract } from "thirdweb"; +import { AdminOnly } from "@/components/contracts/roles/admin-only"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card } from "@/components/ui/card"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/price-preview.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/price-preview.tsx index 95ab6389393..4fb90e1b152 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/price-preview.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/price-preview.tsx @@ -1,7 +1,7 @@ -import { CURRENCIES } from "constants/currencies"; -import { useAllChainsData } from "hooks/chains/allChains"; -import { shortenIfAddress } from "utils/usedapp-external"; -import { isAddressZero } from "utils/zeroAddress"; +import { CURRENCIES } from "@/constants/currencies"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { shortenIfAddress } from "@/utils/usedapp-external"; +import { isAddressZero } from "@/utils/zeroAddress"; interface PricePreviewProps { price: string | number | undefined; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/reset-claim-eligibility.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/reset-claim-eligibility.tsx index f92e0d60c54..c91b14460be 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/reset-claim-eligibility.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/reset-claim-eligibility.tsx @@ -1,15 +1,15 @@ "use client"; -import { AdminOnly } from "@3rdweb-sdk/react/components/roles/admin-only"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { CircleHelpIcon } from "lucide-react"; import type { ThirdwebContract } from "thirdweb"; import * as ERC20Ext from "thirdweb/extensions/erc20"; import * as ERC721Ext from "thirdweb/extensions/erc721"; import * as ERC1155Ext from "thirdweb/extensions/erc1155"; import { useSendAndConfirmTransaction } from "thirdweb/react"; +import { AdminOnly } from "@/components/contracts/roles/admin-only"; +import { TransactionButton } from "@/components/tx-button"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface ResetClaimEligibilityProps { isErc20: boolean; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/snapshot-upload.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/snapshot-upload.tsx index f59fd23d6c4..c2773aad0c6 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/snapshot-upload.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/snapshot-upload.tsx @@ -1,4 +1,3 @@ -import { useCsvUpload } from "hooks/useCsvUpload"; import { CircleAlertIcon, DownloadIcon, UploadIcon } from "lucide-react"; import { useRef } from "react"; import { useDropzone } from "react-dropzone"; @@ -15,6 +14,7 @@ import { SheetTitle, } from "@/components/ui/sheet"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useCsvUpload } from "@/hooks/useCsvUpload"; import { cn } from "@/lib/utils"; import { CsvDataTable } from "../csv-data-table"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/ConfigureCustomChain.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/ConfigureCustomChain.tsx index be1e2247753..6ccca8f8850 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/ConfigureCustomChain.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/ConfigureCustomChain.tsx @@ -1,12 +1,12 @@ "use client"; -import { ConfigureNetworks } from "components/configure-networks/ConfigureNetworks"; import { CheckIcon, CircleAlertIcon, RotateCcwIcon } from "lucide-react"; import { useState } from "react"; -import { addChainOverrides } from "stores/chainStores"; import type { ThirdwebClient } from "thirdweb"; +import { ConfigureNetworks } from "@/components/misc/configure-networks/ConfigureNetworks"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; +import { addChainOverrides } from "@/stores/chainStores"; export function ConfigureCustomChain(props: { chainSlug: string; diff --git a/apps/dashboard/src/components/shared/DeprecatedAlert.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/DeprecatedAlert.tsx similarity index 100% rename from apps/dashboard/src/components/shared/DeprecatedAlert.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/DeprecatedAlert.tsx diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-metadata.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-metadata.tsx index 4cf044ec843..e8bc0017ac3 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-metadata.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-metadata.tsx @@ -1,10 +1,10 @@ +import type { ThirdwebContract } from "thirdweb"; +import type { ChainMetadata } from "thirdweb/chains"; +import { fetchPublishedContractsFromDeploy } from "@/components/contract-components/fetchPublishedContractsFromDeploy"; import { type DashboardContractMetadata, fetchDashboardContractMetadata, -} from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata"; -import { fetchPublishedContractsFromDeploy } from "components/contract-components/fetchPublishedContractsFromDeploy"; -import type { ThirdwebContract } from "thirdweb"; -import type { ChainMetadata } from "thirdweb/chains"; +} from "@/hooks/useDashboardContractMetadata"; import { MetadataHeader } from "./metadata-header"; interface ContractMetadataProps { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.client.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.client.tsx index 2caf76fc87d..f9e66a106c6 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.client.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.client.tsx @@ -1,9 +1,9 @@ "use client"; import { useQuery } from "@tanstack/react-query"; -import type { MinimalTeamsAndProjects } from "components/contract-components/contract-deploy-form/add-to-project-card"; import type { ThirdwebContract } from "thirdweb"; import type { ChainMetadata } from "thirdweb/chains"; +import type { MinimalTeamsAndProjects } from "@/components/contract-components/contract-deploy-form/add-to-project-card"; import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { ErrorPage, LoadingPage } from "../_components/page-skeletons"; import { useContractPageMetadata } from "../_hooks/useContractPageMetadata"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.tsx index 5894dce6755..c2e393506bc 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.tsx @@ -1,11 +1,11 @@ -import type { DashboardContractMetadata } from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata"; -import type { MinimalTeamsAndProjects } from "components/contract-components/contract-deploy-form/add-to-project-card"; -import { DeprecatedAlert } from "components/shared/DeprecatedAlert"; +import { DeprecatedAlert } from "@app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/DeprecatedAlert"; +import { ChakraProviderSetup } from "chakra/ChakraProviderSetup"; import type { ThirdwebContract } from "thirdweb"; import type { ChainMetadata } from "thirdweb/chains"; import type { SidebarLink } from "@/components/blocks/Sidebar"; import { SidebarLayout } from "@/components/blocks/SidebarLayout"; -import { ChakraProviderSetup } from "@/components/ChakraProviderSetup"; +import type { MinimalTeamsAndProjects } from "@/components/contract-components/contract-deploy-form/add-to-project-card"; +import type { DashboardContractMetadata } from "@/hooks/useDashboardContractMetadata"; import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { ContractMetadata } from "./contract-metadata"; import { PrimaryDashboardButton } from "./primary-dashboard-button"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/metadata-header.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/metadata-header.tsx index af0bc421a1e..61b40495ee6 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/metadata-header.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/metadata-header.tsx @@ -1,6 +1,5 @@ "use client"; -import { ChainIconClient } from "components/icons/ChainIcon"; import { ExternalLinkIcon } from "lucide-react"; import Link from "next/link"; import type { ThirdwebClient } from "thirdweb"; @@ -8,6 +7,7 @@ import type { ChainMetadata } from "thirdweb/chains"; import { MediaRenderer } from "thirdweb/react"; import { Button } from "@/components/ui/button"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; +import { ChainIconClient } from "@/icons/ChainIcon"; interface ExternalLink { name: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/primary-dashboard-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/primary-dashboard-button.tsx index d51b9c2059a..8b0e2d4d6c8 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/primary-dashboard-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/primary-dashboard-button.tsx @@ -1,10 +1,5 @@ "use client"; -import type { EVMContractInfo } from "@3rdweb-sdk/react"; -import { - AddToProjectSelector, - type MinimalTeamsAndProjects, -} from "components/contract-components/contract-deploy-form/add-to-project-card"; import { CircleAlertIcon, CodeIcon, @@ -16,6 +11,10 @@ import { usePathname } from "next/navigation"; import { useState } from "react"; import { toast } from "sonner"; import type { Chain, ThirdwebClient } from "thirdweb"; +import { + AddToProjectSelector, + type MinimalTeamsAndProjects, +} from "@/components/contract-components/contract-deploy-form/add-to-project-card"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { @@ -28,7 +27,8 @@ import { } from "@/components/ui/dialog"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; -import { useAddContractToProject } from "../../../../../team/[team_slug]/[project_slug]/(sidebar)/hooks/project-contracts"; +import { useAddContractToProject } from "@/hooks/project-contracts"; +import type { EVMContractInfo } from "@/hooks/useActiveChainId"; import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../_utils/contract-page-path"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractFromParams.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractFromParams.ts index d8e96af2d75..c2102b9f139 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractFromParams.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractFromParams.ts @@ -1,9 +1,9 @@ -import { mapV4ChainToV5Chain } from "contexts/map-chains"; import { getAddress, getContract, isAddress } from "thirdweb"; import { localhost } from "thirdweb/chains"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; -import { fetchChainWithLocalOverrides } from "../../../../../../../utils/fetchChainWithLocalOverrides"; -import { getUserThirdwebClient } from "../../../../../api/lib/getAuthToken"; +import { mapV4ChainToV5Chain } from "@/utils/map-chains"; +import { getUserThirdwebClient } from "../../../../../../../@/api/auth-token"; +import { fetchChainWithLocalOverrides } from "../../../../../../../@/utils/fetchChainWithLocalOverrides"; export async function getContractPageParamsInfo(params: { contractAddress: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractPageMetadataSetup.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractPageMetadataSetup.ts index f6c64793b0e..5785ed02e8a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractPageMetadataSetup.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractPageMetadataSetup.ts @@ -1,6 +1,6 @@ -import { resolveFunctionSelectors } from "lib/selectors"; import type { ThirdwebContract } from "thirdweb"; import { contractType as getContractType } from "thirdweb/extensions/thirdweb"; +import { resolveFunctionSelectors } from "@/lib/selectors"; import { isERC20ClaimConditionsSupported, isERC721ClaimConditionsSupported, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/isAnalyticsSupportedForChain.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/isAnalyticsSupportedForChain.ts index 82dfdf74e86..4ac9c3b7511 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/isAnalyticsSupportedForChain.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/isAnalyticsSupportedForChain.ts @@ -1,5 +1,5 @@ -import { getVercelEnv } from "lib/vercel-utils"; import { INSIGHT_SERVICE_API_KEY } from "@/constants/server-envs"; +import { getVercelEnv } from "@/utils/vercel"; const thirdwebDomain = getVercelEnv() !== "production" ? "thirdweb-dev" : "thirdweb"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/newPublicPage.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/newPublicPage.ts index 830b9a10a9b..14d0a7b47d5 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/newPublicPage.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/newPublicPage.ts @@ -1,7 +1,7 @@ -import { resolveFunctionSelectors } from "lib/selectors"; import type { ThirdwebContract } from "thirdweb"; import { isGetNFTsSupported as ERC721_isGetNFTsSupported } from "thirdweb/extensions/erc721"; import { isGetNFTsSupported as ERC1155_isGetNFTsSupported } from "thirdweb/extensions/erc1155"; +import { resolveFunctionSelectors } from "@/lib/selectors"; import { supportedERCs } from "./detectedFeatures/supportedERCs"; export type NewPublicPageType = "erc20" | "erc1155" | "erc721"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account-permissions/components/account-signer.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account-permissions/components/account-signer.tsx index 4016e9514f9..64dd5ba01c0 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account-permissions/components/account-signer.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account-permissions/components/account-signer.tsx @@ -1,11 +1,13 @@ import { Flex, SimpleGrid, useBreakpointValue } from "@chakra-ui/react"; +import { Card } from "chakra/card"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { formatDistance } from "date-fns"; -import { useAllChainsData } from "hooks/chains/allChains"; import type { ThirdwebClient } from "thirdweb"; import { useActiveAccount } from "thirdweb/react"; -import { Card, Heading, Text } from "tw-components"; import { WalletAddress } from "@/components/blocks/wallet-address"; import { Badge } from "@/components/ui/badge"; +import { useAllChainsData } from "@/hooks/chains/allChains"; export type AccountSignerType = { signer: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/AccountPage.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/AccountPage.tsx index ea0d9062e1e..c139d666ac6 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/AccountPage.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/AccountPage.tsx @@ -1,8 +1,8 @@ "use client"; +import { Heading } from "chakra/heading"; import type { ThirdwebContract } from "thirdweb"; import type { ChainMetadata } from "thirdweb/chains"; -import { Heading } from "tw-components"; import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { AccountBalance } from "./components/account-balance"; import { DepositNative } from "./components/deposit-native"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/account-balance.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/account-balance.tsx index deb35eb7a41..546abb699d7 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/account-balance.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/account-balance.tsx @@ -1,10 +1,10 @@ "use client"; -import { useSplitBalances } from "@3rdweb-sdk/react/hooks/useSplit"; import { SimpleGrid, Stat, StatLabel, StatNumber } from "@chakra-ui/react"; +import { Card } from "chakra/card"; import type { ThirdwebContract } from "thirdweb"; import { useActiveWalletChain, useWalletBalance } from "thirdweb/react"; -import { Card } from "tw-components"; +import { useSplitBalances } from "@/hooks/useSplit"; interface AccountBalanceProps { contract: ThirdwebContract; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/deposit-native.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/deposit-native.tsx index 5fabfb483c1..47ddbab5174 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/deposit-native.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/deposit-native.tsx @@ -1,13 +1,13 @@ "use client"; -import { Input } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useV5DashboardChain } from "lib/v5-adapter"; +import { Card } from "chakra/card"; import { type ChangeEvent, useState } from "react"; -import type { StoredChain } from "stores/chainStores"; import { prepareTransaction, type ThirdwebClient, toWei } from "thirdweb"; import { useSendAndConfirmTransaction } from "thirdweb/react"; -import { Card } from "tw-components"; +import { TransactionButton } from "@/components/tx-button"; +import { Input } from "@/components/ui/input"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; +import type { StoredChain } from "@/stores/chainStores"; interface DepositNativeProps { address: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx index 46e1c6ced42..9d779a405b2 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx @@ -1,7 +1,7 @@ "use client"; -import { useWalletNFTs } from "@3rdweb-sdk/react"; import type { ThirdwebContract } from "thirdweb"; +import { useWalletNFTs } from "@/hooks/useWalletNFTs"; import type { ProjectMeta } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { NFTCards } from "../../_components/NFTCards"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/AccountsPage.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/AccountsPage.tsx index 3b0c66bd87f..6ce4e1c8a40 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/AccountsPage.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/AccountsPage.tsx @@ -1,8 +1,9 @@ "use client"; import { ButtonGroup, Flex } from "@chakra-ui/react"; +import { LinkButton } from "chakra/button"; +import { Heading } from "chakra/heading"; import type { ThirdwebContract } from "thirdweb"; -import { Heading, LinkButton } from "tw-components"; import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { AccountsCount } from "./components/accounts-count"; import { AccountsTable } from "./components/accounts-table"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-table.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-table.tsx index f9d12000baf..5d549279d1f 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-table.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-table.tsx @@ -2,8 +2,8 @@ import { Flex, IconButton, Select, Skeleton } from "@chakra-ui/react"; import { createColumnHelper } from "@tanstack/react-table"; -import { TWTable } from "components/shared/TWTable"; -import { useChainSlug } from "hooks/chains/chainSlug"; +import { Legacy_CopyButton } from "chakra/button"; +import { Text } from "chakra/text"; import { ChevronFirstIcon, ChevronLastIcon, @@ -14,7 +14,8 @@ import { useMemo, useState } from "react"; import type { ThirdwebContract } from "thirdweb"; import { getAccounts, totalAccounts } from "thirdweb/extensions/erc4337"; import { useReadContract } from "thirdweb/react"; -import { Legacy_CopyButton, Text } from "tw-components"; +import { TWTable } from "@/components/blocks/TWTable"; +import { useChainSlug } from "@/hooks/chains/chainSlug"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import type { ProjectMeta } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../../_utils/contract-page-path"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/create-account-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/create-account-button.tsx index 0175eaeff4e..30868c0ddac 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/create-account-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/create-account-button.tsx @@ -1,6 +1,5 @@ "use client"; -import { TransactionButton } from "components/buttons/TransactionButton"; import type { ThirdwebContract } from "thirdweb"; import * as ERC4337Ext from "thirdweb/extensions/erc4337"; import { @@ -8,6 +7,7 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; import { ToolTipLabel } from "@/components/ui/tooltip"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/ContractAnalyticsPage.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/ContractAnalyticsPage.tsx index 1b240e4ea37..15891f1705c 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/ContractAnalyticsPage.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/ContractAnalyticsPage.tsx @@ -1,10 +1,15 @@ "use client"; import type { UseQueryResult } from "@tanstack/react-query"; +import { format } from "date-fns"; +import { useMemo, useState } from "react"; +import type { ThirdwebContract } from "thirdweb"; import { DateRangeSelector, getLastNDaysRange, type Range, -} from "components/analytics/date-range-selector"; +} from "@/components/analytics/date-range-selector"; +import { ThirdwebBarChart } from "@/components/blocks/charts/bar-chart"; +import { SkeletonContainer } from "@/components/ui/skeleton"; import { type AnalyticsQueryParams, type TotalQueryResult, @@ -16,12 +21,7 @@ import { useTotalContractEvents, useTotalContractTransactionAnalytics, useTotalContractUniqueWallets, -} from "data/analytics/hooks"; -import { format } from "date-fns"; -import { useMemo, useState } from "react"; -import type { ThirdwebContract } from "thirdweb"; -import { ThirdwebBarChart } from "@/components/blocks/charts/bar-chart"; -import { SkeletonContainer } from "@/components/ui/skeleton"; +} from "./utils/hooks"; interface ContractAnalyticsPageProps { contract: ThirdwebContract; diff --git a/apps/dashboard/src/data/analytics/contract-event-breakdown.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-event-breakdown.ts similarity index 98% rename from apps/dashboard/src/data/analytics/contract-event-breakdown.ts rename to apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-event-breakdown.ts index 6d2b81eff1f..5f75dd6600d 100644 --- a/apps/dashboard/src/data/analytics/contract-event-breakdown.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-event-breakdown.ts @@ -1,6 +1,6 @@ import { getUnixTime } from "date-fns"; import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; -import { getVercelEnv } from "../../lib/vercel-utils"; +import { getVercelEnv } from "@/utils/vercel"; type InsightAggregationEntry = { event_signature: string; diff --git a/apps/dashboard/src/data/analytics/contract-events.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-events.ts similarity index 97% rename from apps/dashboard/src/data/analytics/contract-events.ts rename to apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-events.ts index 8c896359ca4..061e23c17a5 100644 --- a/apps/dashboard/src/data/analytics/contract-events.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-events.ts @@ -1,6 +1,6 @@ import { getUnixTime } from "date-fns"; import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; -import { getVercelEnv } from "../../lib/vercel-utils"; +import { getVercelEnv } from "@/utils/vercel"; // This is weird aggregation response type, this will be changed later in insight type InsightResponse = { diff --git a/apps/dashboard/src/data/analytics/contract-function-breakdown.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-function-breakdown.ts similarity index 98% rename from apps/dashboard/src/data/analytics/contract-function-breakdown.ts rename to apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-function-breakdown.ts index 0d2fe6b09e7..a8d6faac200 100644 --- a/apps/dashboard/src/data/analytics/contract-function-breakdown.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-function-breakdown.ts @@ -1,6 +1,6 @@ import { getUnixTime } from "date-fns"; import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; -import { getVercelEnv } from "../../lib/vercel-utils"; +import { getVercelEnv } from "@/utils/vercel"; type InsightAggregationEntry = { function_selector: string; diff --git a/apps/dashboard/src/data/analytics/contract-transactions.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-transactions.ts similarity index 97% rename from apps/dashboard/src/data/analytics/contract-transactions.ts rename to apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-transactions.ts index f6e9f44cecc..8195715dbae 100644 --- a/apps/dashboard/src/data/analytics/contract-transactions.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-transactions.ts @@ -1,6 +1,6 @@ import { getUnixTime } from "date-fns"; import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; -import { getVercelEnv } from "../../lib/vercel-utils"; +import { getVercelEnv } from "@/utils/vercel"; // This is weird aggregation response type, this will be changed later in insight type InsightResponse = { diff --git a/apps/dashboard/src/data/analytics/contract-wallet-analytics.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-wallet-analytics.ts similarity index 97% rename from apps/dashboard/src/data/analytics/contract-wallet-analytics.ts rename to apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-wallet-analytics.ts index 36951e3da4a..403fd526985 100644 --- a/apps/dashboard/src/data/analytics/contract-wallet-analytics.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/contract-wallet-analytics.ts @@ -1,6 +1,6 @@ import { getUnixTime } from "date-fns"; import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; -import { getVercelEnv } from "../../lib/vercel-utils"; +import { getVercelEnv } from "@/utils/vercel"; // This is weird aggregation response type, this will be changed later in insight type InsightResponse = { diff --git a/apps/dashboard/src/data/analytics/hooks.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/hooks.ts similarity index 100% rename from apps/dashboard/src/data/analytics/hooks.ts rename to apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/hooks.ts diff --git a/apps/dashboard/src/data/analytics/total-contract-events.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/total-contract-events.ts similarity index 94% rename from apps/dashboard/src/data/analytics/total-contract-events.ts rename to apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/total-contract-events.ts index 119e6443c43..4a9f75f5525 100644 --- a/apps/dashboard/src/data/analytics/total-contract-events.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/total-contract-events.ts @@ -1,5 +1,5 @@ import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; -import { getVercelEnv } from "../../lib/vercel-utils"; +import { getVercelEnv } from "@/utils/vercel"; // This is weird aggregation response type, this will be changed later in insight type InsightResponse = { diff --git a/apps/dashboard/src/data/analytics/total-contract-transactions.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/total-contract-transactions.ts similarity index 94% rename from apps/dashboard/src/data/analytics/total-contract-transactions.ts rename to apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/total-contract-transactions.ts index 3af244239ea..a9165ea53b9 100644 --- a/apps/dashboard/src/data/analytics/total-contract-transactions.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/total-contract-transactions.ts @@ -1,5 +1,5 @@ import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; -import { getVercelEnv } from "../../lib/vercel-utils"; +import { getVercelEnv } from "@/utils/vercel"; // This is weird aggregation response type, this will be changed later in insight type InsightResponse = { diff --git a/apps/dashboard/src/data/analytics/total-unique-wallets.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/total-unique-wallets.ts similarity index 94% rename from apps/dashboard/src/data/analytics/total-unique-wallets.ts rename to apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/total-unique-wallets.ts index a2cb75b0b10..f2650aba63b 100644 --- a/apps/dashboard/src/data/analytics/total-unique-wallets.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/utils/total-unique-wallets.ts @@ -1,5 +1,5 @@ import { NEXT_PUBLIC_DASHBOARD_CLIENT_ID } from "@/constants/public-envs"; -import { getVercelEnv } from "../../lib/vercel-utils"; +import { getVercelEnv } from "@/utils/vercel"; // This is weird aggregation response type, this will be changed later in insight type InsightResponse = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/code/contract-code-page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/code/contract-code-page.tsx index 8708d33ac37..07ec3fd0381 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/code/contract-code-page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/code/contract-code-page.tsx @@ -1,8 +1,8 @@ import type { Abi } from "abitype"; -import { CodeOverview } from "contract-ui/tabs/code/components/code-overview"; import { CircleAlertIcon } from "lucide-react"; import type { ChainMetadata } from "thirdweb/chains"; import type { ThirdwebContract } from "thirdweb/contract"; +import { CodeOverview } from "@/components/contracts/code-overview"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; export function ContractCodePage(props: { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/data-table.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/data-table.tsx index aa44bcb748f..82a19d38be7 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/data-table.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/data-table.tsx @@ -9,12 +9,6 @@ import { useReactTable, } from "@tanstack/react-table"; import { verifyContract } from "app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/sources/ContractSourcesPage"; -import { - type DeployModalStep, - DeployStatusModal, - useDeployStatusModal, -} from "components/contract-components/contract-deploy-form/deploy-context-modal"; -import { useTxNotifications } from "hooks/useTxNotifications"; import Link from "next/link"; import { useEffect, useMemo, useState } from "react"; import { useForm } from "react-hook-form"; @@ -39,6 +33,11 @@ import { import { useActiveAccount, useSwitchActiveWalletChain } from "thirdweb/react"; import { concatHex, padHex } from "thirdweb/utils"; import { z } from "zod"; +import { + type DeployModalStep, + DeployStatusModal, + useDeployStatusModal, +} from "@/components/contract-components/contract-deploy-form/deploy-context-modal"; import { Button } from "@/components/ui/button"; import { Form, @@ -58,6 +57,7 @@ import { TableRow, } from "@/components/ui/table"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../_utils/contract-page-path"; import { SingleNetworkSelector } from "./single-network-selector"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/shared-cross-chain-page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/shared-cross-chain-page.tsx index 31d6449843c..c23df456fad 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/shared-cross-chain-page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/shared-cross-chain-page.tsx @@ -1,4 +1,3 @@ -import { fetchPublishedContractsFromDeploy } from "components/contract-components/fetchPublishedContractsFromDeploy"; import { notFound } from "next/navigation"; import { type ContractOptions, @@ -19,6 +18,7 @@ import { moduleInstalledEvent } from "thirdweb/modules"; import { eth_getCode, getRpcClient } from "thirdweb/rpc"; import type { TransactionReceipt } from "thirdweb/transaction"; import { type AbiFunction, decodeFunctionData } from "thirdweb/utils"; +import { fetchPublishedContractsFromDeploy } from "@/components/contract-components/fetchPublishedContractsFromDeploy"; import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { redirectToContractLandingPage } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/utils"; import { getContractPageParamsInfo } from "../_utils/getContractFromParams"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/single-network-selector.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/single-network-selector.tsx index e0786cc3eff..c6640ba1531 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/single-network-selector.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/single-network-selector.tsx @@ -1,9 +1,9 @@ -import { ChainIconClient } from "components/icons/ChainIcon"; -import { useAllChainsData } from "hooks/chains/allChains"; import { useCallback, useMemo } from "react"; import type { ThirdwebClient } from "thirdweb"; import { SelectWithSearch } from "@/components/blocks/select-with-search"; import { Badge } from "@/components/ui/badge"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { ChainIconClient } from "@/icons/ChainIcon"; type Option = { label: string; value: string }; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/events/events-feed.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/events/events-feed.tsx index ef3bc86b8c8..769f5b355fe 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/events/events-feed.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/events/events-feed.tsx @@ -1,9 +1,5 @@ "use client"; -import { - type InternalTransaction, - useActivity, -} from "@3rdweb-sdk/react/hooks/useActivity"; import { Accordion, AccordionButton, @@ -22,16 +18,21 @@ import { Switch, Tooltip, } from "@chakra-ui/react"; -import { useChainSlug } from "hooks/chains/chainSlug"; -import { useClipboard } from "hooks/useClipboard"; +import { Button } from "chakra/button"; +import { Card } from "chakra/card"; +import { FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { ChevronDownIcon, CircleHelpIcon, CopyIcon } from "lucide-react"; import { useSearchParams } from "next/navigation"; import { Fragment, useId, useMemo, useState } from "react"; import { toast } from "sonner"; import type { ThirdwebContract } from "thirdweb"; import { stringify } from "thirdweb/utils"; -import { Button, Card, FormLabel, Heading, Text } from "tw-components"; import { CodeClient } from "@/components/ui/code/code.client"; +import { useChainSlug } from "@/hooks/chains/chainSlug"; +import { type InternalTransaction, useActivity } from "@/hooks/useActivity"; +import { useClipboard } from "@/hooks/useClipboard"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../_utils/contract-page-path"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/explorer/ContractExplorerPage.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/explorer/ContractExplorerPage.tsx index ca05cf1e0ac..fadfbe58ef0 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/explorer/ContractExplorerPage.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/explorer/ContractExplorerPage.tsx @@ -1,9 +1,9 @@ import type { Abi } from "abitype"; -import { getContractFunctionsFromAbi } from "components/contract-components/getContractFunctionsFromAbi"; -import { ContractFunctionsOverview } from "components/contract-functions/contract-functions"; import { CircleAlertIcon } from "lucide-react"; import type { ThirdwebContract } from "thirdweb"; import type { ChainMetadata } from "thirdweb/chains"; +import { getContractFunctionsFromAbi } from "@/components/contract-components/getContractFunctionsFromAbi"; +import { ContractFunctionsOverview } from "@/components/contracts/functions/contract-functions"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; interface ContractExplorePageProps { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx index 98be66e3e68..679f489746e 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx @@ -1,5 +1,5 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import type { Metadata } from "next"; +import { getAuthToken } from "@/api/auth-token"; import { generateContractLayoutMetadata, SharedContractLayout, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/BatchMetadata.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/BatchMetadata.tsx index 54a52621593..b0f589369dd 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/BatchMetadata.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/BatchMetadata.tsx @@ -1,15 +1,13 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { CircleAlertIcon } from "lucide-react"; import { useCallback } from "react"; import { useForm } from "react-hook-form"; import { sendAndConfirmTransaction, type ThirdwebClient } from "thirdweb"; import { BatchMetadataERC721, BatchMetadataERC1155 } from "thirdweb/modules"; -import { parseAttributes } from "utils/parseAttributes"; import { z } from "zod"; +import { TransactionButton } from "@/components/tx-button"; import { Accordion, AccordionContent, @@ -27,6 +25,8 @@ import { } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { parseAttributes } from "@/utils/parseAttributes"; import { fileBufferOrStringSchema } from "../zod-schemas"; import { ModuleCardUI, type ModuleCardUIProps } from "./module-card"; import type { ModuleInstanceProps } from "./module-instance"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Claimable.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Claimable.tsx index e8002fc22d9..944612a9f52 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Claimable.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Claimable.tsx @@ -2,10 +2,7 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation, useQuery } from "@tanstack/react-query"; -import { TransactionButton } from "components/buttons/TransactionButton"; import { addDays, fromUnixTime } from "date-fns"; -import { useAllChainsData } from "hooks/chains/allChains"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { CircleAlertIcon, PlusIcon, Trash2Icon } from "lucide-react"; import { type Dispatch, @@ -32,6 +29,7 @@ import { import { useActiveAccount, useReadContract } from "thirdweb/react"; import { z } from "zod"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; +import { TransactionButton } from "@/components/tx-button"; import { Accordion, AccordionContent, @@ -54,6 +52,8 @@ import { Label } from "@/components/ui/label"; import { Separator } from "@/components/ui/separator"; import { Skeleton } from "@/components/ui/skeleton"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import { addressSchema } from "../zod-schemas"; import { CurrencySelector } from "./CurrencySelector"; import { ModuleCardUI, type ModuleCardUIProps } from "./module-card"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/CurrencySelector.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/CurrencySelector.tsx index e604f2cbef6..9a9dd7432af 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/CurrencySelector.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/CurrencySelector.tsx @@ -1,7 +1,5 @@ -import { CURRENCIES, type CurrencyMetadata } from "constants/currencies"; import { useMemo, useState } from "react"; import type { ControllerRenderProps, FieldValues } from "react-hook-form"; -import type { StoredChain } from "stores/chainStores"; import { isAddress, NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS } from "thirdweb"; import { Button } from "@/components/ui/button"; import { FormControl } from "@/components/ui/form"; @@ -13,7 +11,9 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { CURRENCIES, type CurrencyMetadata } from "@/constants/currencies"; import { cn } from "@/lib/utils"; +import type { StoredChain } from "@/stores/chainStores"; interface CurrencySelectorProps< TFieldValues extends FieldValues = FieldValues, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Mintable.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Mintable.tsx index 533ec5e7d91..440ccac21f4 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Mintable.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Mintable.tsx @@ -1,8 +1,6 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { CircleAlertIcon } from "lucide-react"; import { useCallback } from "react"; import { useForm } from "react-hook-form"; @@ -19,9 +17,8 @@ import { MintableERC1155, } from "thirdweb/modules"; import { useReadContract } from "thirdweb/react"; -import type { NFTMetadataInputLimited } from "types/modified-types"; -import { parseAttributes } from "utils/parseAttributes"; import { z } from "zod"; +import { TransactionButton } from "@/components/tx-button"; import { Accordion, AccordionContent, @@ -43,6 +40,9 @@ import { Input } from "@/components/ui/input"; import { Separator } from "@/components/ui/separator"; import { Skeleton } from "@/components/ui/skeleton"; import { Textarea } from "@/components/ui/textarea"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import type { NFTMetadataInputLimited } from "@/types/modified-types"; +import { parseAttributes } from "@/utils/parseAttributes"; import { addressSchema } from "../zod-schemas"; import { ModuleCardUI, type ModuleCardUIProps } from "./module-card"; import type { ModuleInstanceProps } from "./module-instance"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/ModuleForm.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/ModuleForm.tsx index e451315fb3d..ed5725e43fa 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/ModuleForm.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/ModuleForm.tsx @@ -2,11 +2,7 @@ import { FormControl, Input, Select, Skeleton, Spacer } from "@chakra-ui/react"; import { useMutation, useQuery } from "@tanstack/react-query"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { - useAllVersions, - usePublishedContractsQuery, -} from "components/contract-components/hooks"; +import { FormErrorMessage, FormLabel } from "chakra/form"; import { useMemo } from "react"; import { FormProvider, type UseFormReturn, useForm } from "react-hook-form"; import { toast } from "sonner"; @@ -30,8 +26,12 @@ import { toFunctionSelector, } from "thirdweb/utils"; import type { Account } from "thirdweb/wallets"; -import { FormErrorMessage, FormLabel } from "tw-components"; +import { TransactionButton } from "@/components/tx-button"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { + useAllVersions, + usePublishedContractsQuery, +} from "@/hooks/contract-hooks"; import { ModuleInstallParams, useModuleInstallParams, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx index 4d45fbf2f89..4b5adeaba45 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx @@ -1,14 +1,13 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { CircleAlertIcon } from "lucide-react"; import { useCallback } from "react"; import { useForm } from "react-hook-form"; import { sendAndConfirmTransaction, type ThirdwebClient } from "thirdweb"; import { OpenEditionMetadataERC721 } from "thirdweb/modules"; import { z } from "zod"; +import { TransactionButton } from "@/components/tx-button"; import { Accordion, AccordionContent, @@ -26,6 +25,7 @@ import { } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import { ModuleCardUI, type ModuleCardUIProps } from "./module-card"; import type { ModuleInstanceProps } from "./module-instance"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx index 63886ec52ef..5aafb673a7b 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx @@ -1,8 +1,6 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { CircleAlertIcon } from "lucide-react"; import { useCallback } from "react"; import { useForm } from "react-hook-form"; @@ -10,6 +8,7 @@ import { sendAndConfirmTransaction, type ThirdwebClient } from "thirdweb"; import { RoyaltyERC721, RoyaltyERC1155 } from "thirdweb/modules"; import { useReadContract } from "thirdweb/react"; import { z } from "zod"; +import { TransactionButton } from "@/components/tx-button"; import { Accordion, AccordionContent, @@ -27,6 +26,7 @@ import { } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Skeleton } from "@/components/ui/skeleton"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import { addressSchema } from "../zod-schemas"; import { ModuleCardUI, type ModuleCardUIProps } from "./module-card"; import type { ModuleInstanceProps } from "./module-instance"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Transferable.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Transferable.tsx index 24388a9a7fc..a999f97a6ee 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Transferable.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Transferable.tsx @@ -2,7 +2,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; -import { TransactionButton } from "components/buttons/TransactionButton"; import { CircleAlertIcon, PlusIcon, Trash2Icon } from "lucide-react"; import { useCallback } from "react"; import { useFieldArray, useForm } from "react-hook-form"; @@ -15,6 +14,7 @@ import { } from "thirdweb/modules"; import { useReadContract } from "thirdweb/react"; import { z } from "zod"; +import { TransactionButton } from "@/components/tx-button"; import { Alert, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/batchMetadata.stories.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/batchMetadata.stories.tsx index df6cccd3f77..a7a67c0870a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/batchMetadata.stories.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/batchMetadata.stories.tsx @@ -1,12 +1,12 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useMutation } from "@tanstack/react-query"; -import type { TransactionError } from "contexts/error-handler"; import { useId, useState } from "react"; import { toast } from "sonner"; -import { BadgeContainer, storybookThirdwebClient } from "stories/utils"; import { ZERO_ADDRESS } from "thirdweb"; import { ConnectButton, ThirdwebProvider } from "thirdweb/react"; import { Checkbox } from "@/components/ui/checkbox"; +import type { TransactionError } from "@/contexts/error-handler"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { BatchMetadataModuleUI, type UploadMetadataFormValues, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/claimable.stories.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/claimable.stories.tsx index c4e2f909e6d..01e8caca7dc 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/claimable.stories.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/claimable.stories.tsx @@ -3,7 +3,6 @@ import { useMutation } from "@tanstack/react-query"; import { subDays } from "date-fns"; import { useId, useState } from "react"; import { toast } from "sonner"; -import { storybookThirdwebClient } from "stories/utils"; import { NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS } from "thirdweb"; import { ConnectButton, ThirdwebProvider } from "thirdweb/react"; import { checksumAddress } from "thirdweb/utils"; @@ -15,6 +14,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { storybookThirdwebClient } from "@/storybook/utils"; import { ClaimableModuleUI, type ClaimConditionFormValues, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/getModuleInstalledParams.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/getModuleInstalledParams.ts index b6072c5e229..f5fc919dbd3 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/getModuleInstalledParams.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/getModuleInstalledParams.ts @@ -1,11 +1,11 @@ -import { - fetchLatestPublishedContractVersion, - fetchPublishedContractVersions, -} from "components/contract-components/fetch-contracts-with-versions"; import { isAddress, type ThirdwebClient } from "thirdweb"; import type { FetchDeployMetadataResult } from "thirdweb/contract"; import { resolveAddress } from "thirdweb/extensions/ens"; import invariant from "tiny-invariant"; +import { + fetchLatestPublishedContractVersion, + fetchPublishedContractVersions, +} from "@/components/contract-components/fetch-contracts-with-versions"; import type { ModuleMeta } from "./install-module-params"; export async function getModuleInstalledParams( diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/install-module-params.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/install-module-params.tsx index f4ffd416195..49349dd8d07 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/install-module-params.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/install-module-params.tsx @@ -1,9 +1,9 @@ import { FormControl } from "@chakra-ui/react"; import { useQuery } from "@tanstack/react-query"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; +import { FormErrorMessage, FormLabel } from "chakra/form"; import type { ThirdwebClient } from "thirdweb"; import invariant from "tiny-invariant"; -import { FormErrorMessage, FormLabel } from "tw-components"; +import { SolidityInput } from "@/components/solidity-inputs"; import { getModuleInstalledParams } from "./getModuleInstalledParams"; import type { InstallModuleForm } from "./ModuleForm"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/mintable.stories.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/mintable.stories.tsx index 16a711e22c4..c8f5a77aaf8 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/mintable.stories.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/mintable.stories.tsx @@ -3,7 +3,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useMutation } from "@tanstack/react-query"; import { useId, useState } from "react"; import { toast } from "sonner"; -import { BadgeContainer, storybookThirdwebClient } from "stories/utils"; import { ConnectButton, ThirdwebProvider } from "thirdweb/react"; import { Checkbox } from "@/components/ui/checkbox"; import { @@ -13,6 +12,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { MintableModuleUI, type MintFormValues, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.stories.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.stories.tsx index 33ec54d1bef..ae891384dcb 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.stories.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.stories.tsx @@ -1,9 +1,9 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useMutation } from "@tanstack/react-query"; import { useId, useState } from "react"; -import { BadgeContainer, storybookThirdwebClient } from "stories/utils"; import { ThirdwebProvider } from "thirdweb/react"; import { Checkbox } from "@/components/ui/checkbox"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { ModuleCardUI } from "./module-card"; const meta = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx index 496237f9354..a0baaf8183e 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx @@ -2,7 +2,6 @@ import * as Sentry from "@sentry/nextjs"; import { useMutation } from "@tanstack/react-query"; -import { TransactionButton } from "components/buttons/TransactionButton"; import { InfoIcon } from "lucide-react"; import { Suspense, useEffect, useState } from "react"; import { ErrorBoundary, type FallbackProps } from "react-error-boundary"; @@ -17,6 +16,7 @@ import { import { uninstallModuleByProxy } from "thirdweb/modules"; import type { Account } from "thirdweb/wallets"; import { WalletAddress } from "@/components/blocks/wallet-address"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; import { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/moduleContractInfo.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/moduleContractInfo.ts index 5c28288e449..6b9d9b5462e 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/moduleContractInfo.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/moduleContractInfo.ts @@ -1,10 +1,10 @@ import { useQuery } from "@tanstack/react-query"; -import { usePublishedContractsFromDeploy } from "components/contract-components/hooks"; -import { THIRDWEB_DEPLOYER_ADDRESS } from "constants/addresses"; import { useMemo } from "react"; import { getContract, type ThirdwebContract } from "thirdweb"; import { getCompilerMetadata } from "thirdweb/contract"; import { useActiveAccount } from "thirdweb/react"; +import { THIRDWEB_DEPLOYER_ADDRESS } from "@/constants/addresses"; +import { usePublishedContractsFromDeploy } from "@/hooks/contract-hooks"; async function getAllModuleContractInfo( installedModules: string[], diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/nft/NFTMediaFormGroup.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/nft/NFTMediaFormGroup.tsx index 7d5128524c5..4a0384d5a3f 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/nft/NFTMediaFormGroup.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/nft/NFTMediaFormGroup.tsx @@ -1,8 +1,8 @@ "use client"; -import { FileInput } from "components/shared/FileInput"; import type { UseFormReturn } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; import type { NFTInput } from "thirdweb/utils"; +import { FileInput } from "@/components/blocks/FileInput"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; import { getUploadedNFTMediaMeta, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/openEditionMetadata.stories.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/openEditionMetadata.stories.tsx index f18c68006a1..2ac66da678e 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/openEditionMetadata.stories.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/openEditionMetadata.stories.tsx @@ -2,9 +2,9 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useMutation } from "@tanstack/react-query"; import { useId, useState } from "react"; import { toast } from "sonner"; -import { BadgeContainer, storybookThirdwebClient } from "stories/utils"; import { ConnectButton, ThirdwebProvider } from "thirdweb/react"; import { Checkbox } from "@/components/ui/checkbox"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { OpenEditionMetadataModuleUI, type SetSharedMetadataFormValues, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/royalty.stories.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/royalty.stories.tsx index 924822ccd77..71cf2b0596d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/royalty.stories.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/royalty.stories.tsx @@ -2,9 +2,9 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useMutation } from "@tanstack/react-query"; import { useId, useState } from "react"; import { toast } from "sonner"; -import { BadgeContainer, storybookThirdwebClient } from "stories/utils"; import { ConnectButton, ThirdwebProvider } from "thirdweb/react"; import { Checkbox } from "@/components/ui/checkbox"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { type DefaultRoyaltyFormValues, type RoyaltyInfoFormValues, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/transferable.stories.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/transferable.stories.tsx index 77f60940cbe..5c0149dd369 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/transferable.stories.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/transferable.stories.tsx @@ -2,9 +2,9 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useMutation } from "@tanstack/react-query"; import { useId, useState } from "react"; import { toast } from "sonner"; -import { BadgeContainer, storybookThirdwebClient } from "stories/utils"; import { ConnectButton, ThirdwebProvider } from "thirdweb/react"; import { Checkbox } from "@/components/ui/checkbox"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { type TransferableModuleFormValues, TransferableModuleUI, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/airdrop-tab.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/airdrop-tab.tsx index b7f99ee9971..07d2310ab50 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/airdrop-tab.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/airdrop-tab.tsx @@ -1,7 +1,5 @@ "use client"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { UploadIcon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; @@ -10,6 +8,7 @@ import type { ThirdwebContract } from "thirdweb"; import { multicall } from "thirdweb/extensions/common"; import { balanceOf, encodeSafeTransferFrom } from "thirdweb/extensions/erc1155"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; import { Sheet, @@ -18,6 +17,7 @@ import { SheetTitle, SheetTrigger, } from "@/components/ui/sheet"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import { cn } from "@/lib/utils"; import { type AirdropAddressInput, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/burn-tab.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/burn-tab.tsx index 73d34eb15ba..27349554858 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/burn-tab.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/burn-tab.tsx @@ -1,8 +1,8 @@ "use client"; import { FormControl, Input } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { useForm } from "react-hook-form"; import type { ThirdwebContract } from "thirdweb"; import { burn as burn721, isERC721 } from "thirdweb/extensions/erc721"; @@ -13,12 +13,8 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; -import { - FormErrorMessage, - FormHelperText, - FormLabel, - Text, -} from "tw-components"; +import { TransactionButton } from "@/components/tx-button"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface BurnTabProps { tokenId: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/claim-tab.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/claim-tab.tsx index 7478f1acdea..6079cd47e40 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/claim-tab.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/claim-tab.tsx @@ -1,15 +1,15 @@ "use client"; import { Flex, FormControl, Input } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { type ThirdwebContract, ZERO_ADDRESS } from "thirdweb"; import { getApprovalForTransaction } from "thirdweb/extensions/erc20"; import { claimTo } from "thirdweb/extensions/erc1155"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; -import { FormErrorMessage, FormHelperText, FormLabel } from "tw-components"; -import { parseError } from "utils/errorParser"; +import { TransactionButton } from "@/components/tx-button"; +import { parseError } from "@/utils/errorParser"; interface ClaimTabProps { contract: ThirdwebContract; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/mint-supply-tab.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/mint-supply-tab.tsx index 67b2630c31e..aa3512cc91a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/mint-supply-tab.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/mint-supply-tab.tsx @@ -1,13 +1,13 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; -import { TransactionButton } from "components/buttons/TransactionButton"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { isAddress, type ThirdwebContract } from "thirdweb"; import { mintAdditionalSupplyTo } from "thirdweb/extensions/erc1155"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; import { z } from "zod"; +import { TransactionButton } from "@/components/tx-button"; import { Form, FormControl, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/transfer-tab.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/transfer-tab.tsx index acbaac2dfb8..202c9ba60c5 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/transfer-tab.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/transfer-tab.tsx @@ -1,9 +1,7 @@ "use client"; import { FormControl, Input } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; import { useForm } from "react-hook-form"; import { type ThirdwebContract, ZERO_ADDRESS } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc721"; @@ -13,8 +11,10 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; -import { FormErrorMessage, FormHelperText, FormLabel } from "tw-components"; import { GenericLoadingPage } from "@/components/blocks/skeletons/GenericLoadingPage"; +import { SolidityInput } from "@/components/solidity-inputs"; +import { TransactionButton } from "@/components/tx-button"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface TransferTabProps { contract: ThirdwebContract; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/update-metadata-form.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/update-metadata-form.tsx index 57a9019dd1f..14cb097285f 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/update-metadata-form.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/update-metadata-form.tsx @@ -10,11 +10,9 @@ import { Input, Textarea, } from "@chakra-ui/react"; -import { OpenSeaPropertyBadge } from "components/badges/opensea"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { PropertiesFormControl } from "components/contract-pages/forms/properties.shared"; -import { FileInput } from "components/shared/FileInput"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; import { type Dispatch, type SetStateAction, useMemo } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; @@ -29,15 +27,13 @@ import { } from "thirdweb/extensions/erc1155"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; import type { NFTMetadata } from "thirdweb/utils"; -import { - Button, - FormErrorMessage, - FormHelperText, - FormLabel, - Heading, -} from "tw-components"; -import type { NFTMetadataInputLimited } from "types/modified-types"; -import { parseAttributes } from "utils/parseAttributes"; +import { OpenSeaPropertyBadge } from "@/components/badges/opensea"; +import { FileInput } from "@/components/blocks/FileInput"; +import { PropertiesFormControl } from "@/components/contracts/properties.shared"; +import { TransactionButton } from "@/components/tx-button"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import type { NFTMetadataInputLimited } from "@/types/modified-types"; +import { parseAttributes } from "@/utils/parseAttributes"; import { getUploadedNFTMediaMeta, handleNFTMediaUpload, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/shared-nfts-token-page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/shared-nfts-token-page.tsx index 5155412614e..fb5414f63aa 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/shared-nfts-token-page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/shared-nfts-token-page.tsx @@ -1,5 +1,5 @@ import { notFound, redirect } from "next/navigation"; -import { getAuthTokenWalletAddress } from "../../../../../../api/lib/getAuthToken"; +import { getAuthTokenWalletAddress } from "../../../../../../../../@/api/auth-token"; import type { ProjectMeta } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { redirectToContractLandingPage } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/utils"; import { buildContractPagePath } from "../../_utils/contract-page-path"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/token-id.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/token-id.tsx index 30d45249b29..eb3051a4486 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/token-id.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/token-id.tsx @@ -1,6 +1,5 @@ "use client"; -import { useChainSlug } from "hooks/chains/chainSlug"; import { ExternalLinkIcon } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; @@ -8,8 +7,8 @@ import type { NFT, ThirdwebClient, ThirdwebContract } from "thirdweb"; import { getNFT as getErc721NFT } from "thirdweb/extensions/erc721"; import { getNFT as getErc1155NFT } from "thirdweb/extensions/erc1155"; import { useReadContract } from "thirdweb/react"; -import { NFTMediaWithEmptyState } from "tw-components/nft-media"; import { UnexpectedValueErrorMessage } from "@/components/blocks/error-fallbacks/unexpect-value-error-message"; +import { NFTMediaWithEmptyState } from "@/components/blocks/nft-media"; import { WalletAddress } from "@/components/blocks/wallet-address"; import { Badge } from "@/components/ui/badge"; import { @@ -25,7 +24,8 @@ import { CodeClient } from "@/components/ui/code/code.client"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { TabButtons } from "@/components/ui/tabs"; import { ToolTipLabel } from "@/components/ui/tooltip"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { useChainSlug } from "@/hooks/chains/chainSlug"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; import type { ProjectMeta } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../../_utils/contract-page-path"; import { NftProperty } from "../components/nft-property"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/useNftDrawerTabs.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/useNftDrawerTabs.tsx index 694ff041c9e..aa0271238c6 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/useNftDrawerTabs.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/useNftDrawerTabs.tsx @@ -1,5 +1,3 @@ -import { useIsMinter } from "@3rdweb-sdk/react/hooks/useContractRoles"; -import { useContractFunctionSelectors } from "contract-ui/hooks/useContractFunctionSelectors"; import dynamic from "next/dynamic"; import { useMemo } from "react"; import type { ThirdwebContract } from "thirdweb"; @@ -7,6 +5,8 @@ import * as ERC721Ext from "thirdweb/extensions/erc721"; import * as ERC1155Ext from "thirdweb/extensions/erc1155"; import { useReadContract } from "thirdweb/react"; import { checksumAddress } from "thirdweb/utils"; +import { useContractFunctionSelectors } from "@/hooks/contract-ui/useContractFunctionSelectors"; +import { useIsMinter } from "@/hooks/useContractRoles"; import type { NFTDrawerTab } from "./types"; type UseNFTDrawerTabsParams = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/batch-lazy-mint-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/batch-lazy-mint-button.tsx index 0d7ff3e0b09..77e9943297e 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/batch-lazy-mint-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/batch-lazy-mint-button.tsx @@ -1,14 +1,13 @@ "use client"; -import { MinterOnly } from "@3rdweb-sdk/react/components/roles/minter-only"; -import { BatchLazyMint } from "core-ui/batch-upload/batch-lazy-mint"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { FileStackIcon } from "lucide-react"; import { useState } from "react"; import type { ThirdwebContract } from "thirdweb"; import * as ERC721Ext from "thirdweb/extensions/erc721"; import * as ERC1155Ext from "thirdweb/extensions/erc1155"; import { useReadContract, useSendAndConfirmTransaction } from "thirdweb/react"; +import { BatchLazyMint } from "@/components/batch-upload/batch-lazy-mint"; +import { MinterOnly } from "@/components/contracts/roles/minter-only"; import { Button } from "@/components/ui/button"; import { Sheet, @@ -17,6 +16,7 @@ import { SheetTitle, SheetTrigger, } from "@/components/ui/sheet"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface BatchLazyMintButtonProps { canCreateDelayedRevealBatch: boolean; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/claim-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/claim-button.tsx index f97a0a19ed6..4f5681bd7b1 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/claim-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/claim-button.tsx @@ -1,8 +1,7 @@ "use client"; import { FormControl, Input } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; import { GemIcon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; @@ -11,7 +10,7 @@ import { isAddress, type ThirdwebContract, ZERO_ADDRESS } from "thirdweb"; import { getApprovalForTransaction } from "thirdweb/extensions/erc20"; import { claimTo } from "thirdweb/extensions/erc721"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; -import { FormErrorMessage, FormHelperText, FormLabel } from "tw-components"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; import { Sheet, @@ -20,6 +19,7 @@ import { SheetTitle, SheetTrigger, } from "@/components/ui/sheet"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; const CLAIM_FORM_ID = "nft-claim-form"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/lazy-mint-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/lazy-mint-button.tsx index 9b588a49fd7..cfa54c5e529 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/lazy-mint-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/lazy-mint-button.tsx @@ -1,8 +1,8 @@ "use client"; -import { MinterOnly } from "@3rdweb-sdk/react/components/roles/minter-only"; import { PlusIcon } from "lucide-react"; import { useState } from "react"; import type { ThirdwebContract } from "thirdweb"; +import { MinterOnly } from "@/components/contracts/roles/minter-only"; import { Button } from "@/components/ui/button"; import { Sheet, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/lazy-mint-form.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/lazy-mint-form.tsx index e1d9f4049ab..d2885dbfce5 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/lazy-mint-form.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/lazy-mint-form.tsx @@ -11,11 +11,8 @@ import { Input, Textarea, } from "@chakra-ui/react"; -import { OpenSeaPropertyBadge } from "components/badges/opensea"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { PropertiesFormControl } from "components/contract-pages/forms/properties.shared"; -import { FileInput } from "components/shared/FileInput"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; import type { Dispatch, SetStateAction } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; @@ -23,15 +20,14 @@ import type { ThirdwebContract } from "thirdweb"; import { lazyMint as lazyMint721 } from "thirdweb/extensions/erc721"; import { lazyMint as lazyMint1155 } from "thirdweb/extensions/erc1155"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; -import { - FormErrorMessage, - FormHelperText, - FormLabel, - Heading, -} from "tw-components"; -import type { NFTMetadataInputLimited } from "types/modified-types"; -import { parseAttributes } from "utils/parseAttributes"; +import { OpenSeaPropertyBadge } from "@/components/badges/opensea"; +import { FileInput } from "@/components/blocks/FileInput"; +import { PropertiesFormControl } from "@/components/contracts/properties.shared"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import type { NFTMetadataInputLimited } from "@/types/modified-types"; +import { parseAttributes } from "@/utils/parseAttributes"; import { getUploadedNFTMediaMeta, handleNFTMediaUpload, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/mint-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/mint-button.tsx index 5d4cecde2fc..363747d5134 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/mint-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/mint-button.tsx @@ -1,9 +1,9 @@ "use client"; -import { MinterOnly } from "@3rdweb-sdk/react/components/roles/minter-only"; import { PlusIcon } from "lucide-react"; import { useState } from "react"; import type { ThirdwebContract } from "thirdweb"; +import { MinterOnly } from "@/components/contracts/roles/minter-only"; import { Button } from "@/components/ui/button"; import { Sheet, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/mint-form.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/mint-form.tsx index 827c5630a3a..55a00904aa1 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/mint-form.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/mint-form.tsx @@ -11,11 +11,9 @@ import { Input, Textarea, } from "@chakra-ui/react"; -import { OpenSeaPropertyBadge } from "components/badges/opensea"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { PropertiesFormControl } from "components/contract-pages/forms/properties.shared"; -import { FileInput } from "components/shared/FileInput"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; import type { Dispatch, SetStateAction } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; @@ -23,15 +21,13 @@ import type { ThirdwebContract } from "thirdweb"; import { mintTo as erc721MintTo } from "thirdweb/extensions/erc721"; import { mintTo as erc1155MintTo } from "thirdweb/extensions/erc1155"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; -import { - Button, - FormErrorMessage, - FormHelperText, - FormLabel, - Heading, -} from "tw-components"; -import type { NFTMetadataInputLimited } from "types/modified-types"; -import { parseAttributes } from "utils/parseAttributes"; +import { OpenSeaPropertyBadge } from "@/components/badges/opensea"; +import { FileInput } from "@/components/blocks/FileInput"; +import { PropertiesFormControl } from "@/components/contracts/properties.shared"; +import { TransactionButton } from "@/components/tx-button"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import type { NFTMetadataInputLimited } from "@/types/modified-types"; +import { parseAttributes } from "@/utils/parseAttributes"; import { getUploadedNFTMediaMeta, handleNFTMediaUpload, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/reveal-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/reveal-button.tsx index c0606f7522a..9460ad40433 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/reveal-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/reveal-button.tsx @@ -1,8 +1,7 @@ "use client"; -import { MinterOnly } from "@3rdweb-sdk/react/components/roles/minter-only"; import { FormControl, Input, Select } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; +import { FormErrorMessage, FormLabel } from "chakra/form"; import { EyeIcon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; @@ -10,7 +9,8 @@ import { toast } from "sonner"; import type { ThirdwebContract } from "thirdweb"; import { getBatchesToReveal, reveal } from "thirdweb/extensions/erc721"; import { useReadContract, useSendAndConfirmTransaction } from "thirdweb/react"; -import { FormErrorMessage, FormLabel } from "tw-components"; +import { MinterOnly } from "@/components/contracts/roles/minter-only"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; import { Sheet, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-button.tsx index b8fa48aada0..c33b4ad1716 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-button.tsx @@ -1,8 +1,8 @@ "use client"; -import { MinterOnly } from "@3rdweb-sdk/react/components/roles/minter-only"; import { PlusIcon } from "lucide-react"; import { useState } from "react"; import type { ThirdwebContract } from "thirdweb"; +import { MinterOnly } from "@/components/contracts/roles/minter-only"; import { Button } from "@/components/ui/button"; import { Sheet, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-form.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-form.tsx index 8d2326d807c..d3789d3f868 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-form.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-form.tsx @@ -11,24 +11,20 @@ import { Input, Textarea, } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { FileInput } from "components/shared/FileInput"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; import type { Dispatch, SetStateAction } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import type { ThirdwebContract } from "thirdweb"; import { setSharedMetadata } from "thirdweb/extensions/erc721"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; -import { - Button, - FormErrorMessage, - FormHelperText, - FormLabel, - Heading, -} from "tw-components"; -import type { NFTMetadataInputLimited } from "types/modified-types"; -import { parseAttributes } from "utils/parseAttributes"; +import { FileInput } from "@/components/blocks/FileInput"; +import { TransactionButton } from "@/components/tx-button"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import type { NFTMetadataInputLimited } from "@/types/modified-types"; +import { parseAttributes } from "@/utils/parseAttributes"; import { getUploadedNFTMediaMeta, handleNFTMediaUpload, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/table.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/table.tsx index 1ffe106157b..db58bcc64cb 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/table.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/table.tsx @@ -16,8 +16,6 @@ import { Tr, } from "@chakra-ui/react"; import * as Sentry from "@sentry/nextjs"; -import { MediaCell } from "components/contract-pages/table/table-columns/cells/media-cell"; -import { useChainSlug } from "hooks/chains/chainSlug"; import { ArrowRightIcon, ChevronFirstIcon, @@ -39,7 +37,9 @@ import * as ERC1155Ext from "thirdweb/extensions/erc1155"; import { useReadContract } from "thirdweb/react"; import { UnexpectedValueErrorMessage } from "@/components/blocks/error-fallbacks/unexpect-value-error-message"; import { WalletAddress } from "@/components/blocks/wallet-address"; +import { MediaCell } from "@/components/contracts/media-cell"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; +import { useChainSlug } from "@/hooks/chains/chainSlug"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import { cn } from "@/lib/utils"; import type { ProjectMeta } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/Analytics.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/Analytics.tsx index 543e5f776a2..c57761eb80d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/Analytics.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/Analytics.tsx @@ -1,10 +1,5 @@ "use client"; -import { - useContractEventAnalytics, - useContractTransactionAnalytics, - useContractUniqueWalletAnalytics, -} from "data/analytics/hooks"; import { differenceInCalendarDays, format } from "date-fns"; import { ArrowRightIcon } from "lucide-react"; import Link from "next/link"; @@ -13,6 +8,11 @@ import { ThirdwebAreaChart } from "@/components/blocks/charts/area-chart"; import { Button } from "@/components/ui/button"; import type { ProjectMeta } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../../_utils/contract-page-path"; +import { + useContractEventAnalytics, + useContractTransactionAnalytics, + useContractUniqueWalletAnalytics, +} from "../../analytics/utils/hooks"; function getDateKey(date: Date, precision: "day" | "hour") { const dayKey = date.toISOString().split("T")[0]; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/BuildYourApp.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/BuildYourApp.tsx index fb029ad63f3..b0fddffac4f 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/BuildYourApp.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/BuildYourApp.tsx @@ -1,6 +1,6 @@ -import { ReactIcon } from "components/icons/brand-icons/ReactIcon"; -import { TypeScriptIcon } from "components/icons/brand-icons/TypeScriptIcon"; import Link from "next/link"; +import { ReactIcon } from "@/icons/brand-icons/ReactIcon"; +import { TypeScriptIcon } from "@/icons/brand-icons/TypeScriptIcon"; import type { ProjectMeta } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../../_utils/contract-page-path"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/ContractChecklist.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/ContractChecklist.tsx index 7936bbba301..71630fad273 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/ContractChecklist.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/ContractChecklist.tsx @@ -1,8 +1,5 @@ "use client"; -import { AdminOnly } from "@3rdweb-sdk/react/components/roles/admin-only"; -import { useIsMinter } from "@3rdweb-sdk/react/hooks/useContractRoles"; -import { StepsCard } from "components/dashboard/StepsCard"; import Link from "next/link"; import { useMemo } from "react"; import type { ThirdwebContract } from "thirdweb"; @@ -12,6 +9,9 @@ import * as ERC1155Ext from "thirdweb/extensions/erc1155"; import * as ERC4337Ext from "thirdweb/extensions/erc4337"; import { getAccounts } from "thirdweb/extensions/erc4337"; import { useReadContract } from "thirdweb/react"; +import { StepsCard } from "@/components/blocks/StepsCard"; +import { AdminOnly } from "@/components/contracts/roles/admin-only"; +import { useIsMinter } from "@/hooks/useContractRoles"; import type { ProjectMeta } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../../_utils/contract-page-path"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/LatestEvents.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/LatestEvents.tsx index bfca5d5e4bb..cca2e6b0fc1 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/LatestEvents.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/LatestEvents.tsx @@ -1,13 +1,8 @@ "use client"; -import { - type InternalTransaction, - useActivity, -} from "@3rdweb-sdk/react/hooks/useActivity"; import { ArrowRightIcon } from "lucide-react"; import Link from "next/link"; import type { ThirdwebContract } from "thirdweb"; -import { shortenString } from "utils/usedapp-external"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; @@ -21,6 +16,8 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; +import { type InternalTransaction, useActivity } from "@/hooks/useActivity"; +import { shortenString } from "@/utils/usedapp-external"; import type { ProjectMeta } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../../_utils/contract-page-path"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx index 268a1017a9d..c952a5932f0 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx @@ -18,7 +18,7 @@ import { } from "thirdweb/extensions/marketplace"; import { useReadContract } from "thirdweb/react"; import { min } from "thirdweb/utils"; -import { NFTMediaWithEmptyState } from "tw-components/nft-media"; +import { NFTMediaWithEmptyState } from "@/components/blocks/nft-media"; import { WalletAddress } from "@/components/blocks/wallet-address"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/PermissionsTable.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/PermissionsTable.tsx index d760142875c..6d685623d22 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/PermissionsTable.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/PermissionsTable.tsx @@ -1,6 +1,5 @@ "use client"; -import { getAllRoleMembers } from "contract-ui/hooks/permissions"; import { ArrowRightIcon } from "lucide-react"; import Link from "next/link"; import { useMemo } from "react"; @@ -23,6 +22,7 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; +import { getAllRoleMembers } from "@/hooks/contract-ui/permissions"; import type { ProjectMeta } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../../_utils/contract-page-path"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by-ui.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by-ui.tsx index be64d3512d5..a732d778e78 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by-ui.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by-ui.tsx @@ -1,7 +1,3 @@ -import { fetchPublishedContractsFromDeploy } from "components/contract-components/fetchPublishedContractsFromDeploy"; -import { ContractCard } from "components/explore/contract-card"; -import { THIRDWEB_DEPLOYER_ADDRESS } from "constants/addresses"; -import { resolveEns } from "lib/ens"; import type { ThirdwebContract } from "thirdweb"; import { polygon } from "thirdweb/chains"; import { getBytecode, getContract } from "thirdweb/contract"; @@ -9,6 +5,10 @@ import { getPublishedUriFromCompilerUri } from "thirdweb/extensions/thirdweb"; import { getInstalledModules } from "thirdweb/modules"; import { download } from "thirdweb/storage"; import { extractIPFSUri, isValidENSName } from "thirdweb/utils"; +import { fetchPublishedContractsFromDeploy } from "@/components/contract-components/fetchPublishedContractsFromDeploy"; +import { ContractCard } from "@/components/contracts/contract-card"; +import { THIRDWEB_DEPLOYER_ADDRESS } from "@/constants/addresses"; +import { resolveEns } from "@/lib/ens"; type ModuleMetadataPickedKeys = { publisher: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by.server.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by.server.tsx index 897557b9f6d..e7a9f865108 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by.server.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by.server.tsx @@ -1,5 +1,5 @@ import type { ThirdwebContract } from "thirdweb"; -import { getAuthTokenWalletAddress } from "../../../../../../api/lib/getAuthToken"; +import { getAuthTokenWalletAddress } from "../../../../../../../../@/api/auth-token"; import { getPublishedByCardProps, PublishedByUI } from "./published-by-ui"; interface PublishedByProps { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/ContractPermissionsPage.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/ContractPermissionsPage.tsx index cb52f96ce4e..c167a3a43d6 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/ContractPermissionsPage.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/ContractPermissionsPage.tsx @@ -1,8 +1,12 @@ "use client"; import { ButtonGroup, Divider, Flex } from "@chakra-ui/react"; +import { LinkButton } from "chakra/button"; +import { Card } from "chakra/card"; +import { Heading } from "chakra/heading"; +import { Link } from "chakra/link"; +import { Text } from "chakra/text"; import type { ThirdwebContract } from "thirdweb"; -import { Card, Heading, Link, LinkButton, Text } from "tw-components"; import { InlineCode } from "@/components/ui/inline-code"; import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { buildContractPagePath } from "../_utils/contract-page-path"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/contract-permission.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/contract-permission.tsx index 7e5f7e8944e..30b55392fb1 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/contract-permission.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/contract-permission.tsx @@ -1,9 +1,9 @@ -import { useIsAdmin } from "@3rdweb-sdk/react/hooks/useContractRoles"; import { Flex, Select, Spinner } from "@chakra-ui/react"; import { InfoIcon } from "lucide-react"; import { useFormContext } from "react-hook-form"; import { type ThirdwebContract, ZERO_ADDRESS } from "thirdweb"; import { Card } from "@/components/ui/card"; +import { useIsAdmin } from "@/hooks/useContractRoles"; import { PermissionEditor } from "./permissions-editor"; interface ContractPermissionProps { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/index.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/index.tsx index ff390eef552..34721354027 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/index.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/index.tsx @@ -1,13 +1,7 @@ "use client"; import { ButtonGroup, Flex } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { ROLE_DESCRIPTION_MAP } from "constants/mappings"; -import { - createSetAllRoleMembersTx, - getAllRoleMembers, -} from "contract-ui/hooks/permissions"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; import { useMemo } from "react"; import { FormProvider, useForm } from "react-hook-form"; import type { ThirdwebContract } from "thirdweb"; @@ -16,7 +10,13 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; -import { Button } from "tw-components"; +import { TransactionButton } from "@/components/tx-button"; +import { ROLE_DESCRIPTION_MAP } from "@/constants/mappings"; +import { + createSetAllRoleMembersTx, + getAllRoleMembers, +} from "@/hooks/contract-ui/permissions"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import { ContractPermission } from "./contract-permission"; type PermissionFormContext = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/permissions-editor.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/permissions-editor.tsx index 9dc19ca20da..07a94e83cb5 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/permissions-editor.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/permissions-editor.tsx @@ -1,7 +1,3 @@ -import { - AdminOnly, - AdminOrSelfOnly, -} from "@3rdweb-sdk/react/components/roles/admin-only"; import { Flex, FormControl, @@ -11,8 +7,9 @@ import { InputLeftAddon, InputRightAddon, } from "@chakra-ui/react"; -import { DelayedDisplay } from "components/delayed-display/delayed-display"; -import { useClipboard } from "hooks/useClipboard"; +import { Button } from "chakra/button"; +import { FormErrorMessage } from "chakra/form"; +import { Text } from "chakra/text"; import { ClipboardPasteIcon, CopyIcon, @@ -24,8 +21,13 @@ import { useState } from "react"; import { useFieldArray, useFormContext } from "react-hook-form"; import { toast } from "sonner"; import { isAddress, type ThirdwebContract, ZERO_ADDRESS } from "thirdweb"; -import { Button, FormErrorMessage, Text } from "tw-components"; +import { + AdminOnly, + AdminOrSelfOnly, +} from "@/components/contracts/roles/admin-only"; +import { DelayedDisplay } from "@/components/misc/delayed-display"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useClipboard } from "@/hooks/useClipboard"; interface PermissionEditorProps { role: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/ContractProposalsPage.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/ContractProposalsPage.tsx index 64eefa6cd3a..a28f6a52b7b 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/ContractProposalsPage.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/ContractProposalsPage.tsx @@ -1,12 +1,13 @@ "use client"; -import { voteTokenBalances } from "@3rdweb-sdk/react/hooks/useVote"; import { Divider, Flex, Stat, StatLabel, StatNumber } from "@chakra-ui/react"; +import { Card } from "chakra/card"; +import { Heading } from "chakra/heading"; import { useMemo } from "react"; import type { ThirdwebContract } from "thirdweb"; import * as VoteExt from "thirdweb/extensions/vote"; import { useActiveAccount, useReadContract } from "thirdweb/react"; -import { Card, Heading } from "tw-components"; +import { voteTokenBalances } from "@/hooks/useVote"; import { DelegateButton } from "./components/delegate-button"; import { Proposal } from "./components/proposal"; import { ProposalButton } from "./components/proposal-button"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/delegate-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/delegate-button.tsx index 6f985caab63..143459bfd56 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/delegate-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/delegate-button.tsx @@ -1,14 +1,11 @@ "use client"; -import { - tokensDelegated, - useDelegateMutation, -} from "@3rdweb-sdk/react/hooks/useVote"; -import { TransactionButton } from "components/buttons/TransactionButton"; import { toast } from "sonner"; import type { ThirdwebContract } from "thirdweb"; import { useActiveAccount, useReadContract } from "thirdweb/react"; +import { TransactionButton } from "@/components/tx-button"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { tokensDelegated, useDelegateMutation } from "@/hooks/useVote"; interface VoteButtonProps { contract: ThirdwebContract; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal-button.tsx index 0bffa7bc022..d41b04a8137 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal-button.tsx @@ -1,7 +1,8 @@ "use client"; import { FormControl, Textarea } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; +import { Button } from "chakra/button"; +import { FormErrorMessage, FormLabel } from "chakra/form"; import { PlusIcon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; @@ -9,7 +10,7 @@ import { toast } from "sonner"; import type { ThirdwebContract } from "thirdweb"; import * as VoteExt from "thirdweb/extensions/vote"; import { useSendAndConfirmTransaction } from "thirdweb/react"; -import { Button, FormErrorMessage, FormLabel } from "tw-components"; +import { TransactionButton } from "@/components/tx-button"; import { Sheet, SheetContent, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal.tsx index 5e04cd7044c..d468c0a196a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal.tsx @@ -1,10 +1,8 @@ "use client"; -import { - tokensDelegated, - votingTokenDecimals, -} from "@3rdweb-sdk/react/hooks/useVote"; -import { TransactionButton } from "components/buttons/TransactionButton"; +import { Button } from "chakra/button"; +import { Card } from "chakra/card"; +import { Text } from "chakra/text"; import { CheckIcon, MinusIcon, XIcon } from "lucide-react"; import { useState } from "react"; import { toast } from "sonner"; @@ -15,7 +13,8 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; -import { Button, Card, Text } from "tw-components"; +import { TransactionButton } from "@/components/tx-button"; +import { tokensDelegated, votingTokenDecimals } from "@/hooks/useVote"; const ProposalStateToMetadataMap: Record< keyof typeof VoteExt.ProposalState, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/PageHeader.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/PageHeader.tsx index 20dda38a7dd..2aa73ebc70a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/PageHeader.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/PageHeader.tsx @@ -1,5 +1,5 @@ import Link from "next/link"; -import { ToggleThemeButton } from "@/components/color-mode-toggle"; +import { ToggleThemeButton } from "@/components/blocks/color-mode-toggle"; import { cn } from "@/lib/utils"; import { ThirdwebMiniLogo } from "../../../../../../components/ThirdwebMiniLogo"; import { PublicPageConnectButton } from "./PublicPageConnectButton"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/PublicPageConnectButton.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/PublicPageConnectButton.tsx index 6d16627a850..db9e6bb4b5a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/PublicPageConnectButton.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/PublicPageConnectButton.tsx @@ -1,10 +1,10 @@ "use client"; -import { getSDKTheme } from "app/(app)/components/sdk-component-theme"; -import { useAllChainsData } from "hooks/chains/allChains"; import { useTheme } from "next-themes"; import { ConnectButton } from "thirdweb/react"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { getSDKTheme } from "@/utils/sdk-component-theme"; const client = getClientThirdwebClient(); diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/supply-claimed-progress.stories.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/supply-claimed-progress.stories.tsx index 5dcc41f3c60..32fa1ece2df 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/supply-claimed-progress.stories.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/supply-claimed-progress.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { maxUint256 } from "thirdweb/utils"; -import { BadgeContainer } from "../../../../../../../../stories/utils"; +import { BadgeContainer } from "../../../../../../../../@/storybook/utils"; import { SupplyClaimedProgress } from "./supply-claimed-progress"; const meta = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.stories.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.stories.tsx index a9f1a9aea06..a0b606a4c8f 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.stories.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.stories.tsx @@ -1,8 +1,8 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { storybookThirdwebClient } from "stories/utils"; import { getContract } from "thirdweb"; import type { ChainMetadata } from "thirdweb/chains"; import { ThirdwebProvider } from "thirdweb/react"; +import { storybookThirdwebClient } from "@/storybook/utils"; import { ContractHeaderUI } from "./ContractHeader"; const meta = { 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 5b4c89c6db9..9478c9500cc 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 @@ -1,13 +1,3 @@ -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"; -import { ChainIconClient } from "components/icons/ChainIcon"; import { ExternalLinkIcon, GlobeIcon } from "lucide-react"; import Link from "next/link"; import { useMemo } from "react"; @@ -17,8 +7,18 @@ import { Img } from "@/components/blocks/Img"; import { Button } from "@/components/ui/button"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; import { ToolTipLabel } from "@/components/ui/tooltip"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { DiscordIcon } from "@/icons/brand-icons/DiscordIcon"; +import { GithubIcon } from "@/icons/brand-icons/GithubIcon"; +import { InstagramIcon } from "@/icons/brand-icons/InstagramIcon"; +import { LinkedInIcon } from "@/icons/brand-icons/LinkedinIcon"; +import { RedditIcon } from "@/icons/brand-icons/RedditIcon"; +import { TelegramIcon } from "@/icons/brand-icons/TelegramIcon"; +import { TiktokIcon } from "@/icons/brand-icons/TiktokIcon"; +import { XIcon as TwitterXIcon } from "@/icons/brand-icons/XIcon"; +import { YoutubeIcon } from "@/icons/brand-icons/YoutubeIcon"; +import { ChainIconClient } from "@/icons/ChainIcon"; import { cn } from "@/lib/utils"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; const platformToIcons: Record> = { discord: DiscordIcon, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/PayEmbedSection.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/PayEmbedSection.tsx index 2018a60ae40..98b5dc47fb3 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/PayEmbedSection.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/PayEmbedSection.tsx @@ -3,7 +3,7 @@ import { useTheme } from "next-themes"; import type { Chain, ThirdwebClient } from "thirdweb"; import { PayEmbed } from "thirdweb/react"; -import { getSDKTheme } from "../../../../../../../components/sdk-component-theme"; +import { getSDKTheme } from "../../../../../../../../../@/utils/sdk-component-theme"; export function BuyTokenEmbed(props: { client: ThirdwebClient; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.stories.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.stories.tsx index 1e37b679e0a..7fd2159ff07 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.stories.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.stories.tsx @@ -1,8 +1,8 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { storybookThirdwebClient } from "stories/utils"; import { getContract } from "thirdweb"; import { baseSepolia } from "thirdweb/chains"; import { ThirdwebProvider } from "thirdweb/react"; +import { storybookThirdwebClient } from "@/storybook/utils"; import { TokenDropClaim } from "./claim-tokens-ui"; const meta = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx index 34ecb8756c7..fefd74cb9b6 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx @@ -1,7 +1,6 @@ "use client"; import { useMutation, useQuery } from "@tanstack/react-query"; -import { TransactionButton } from "components/buttons/TransactionButton"; import { CheckIcon, CircleAlertIcon, @@ -28,19 +27,20 @@ import { } from "thirdweb/extensions/erc20"; import { useActiveAccount, useSendTransaction } from "thirdweb/react"; import { getClaimParams } from "thirdweb/utils"; -import { parseError } from "utils/errorParser"; -import { tryCatch } from "utils/try-catch"; import { reportAssetBuyFailed, reportAssetBuySuccessful, } from "@/analytics/report"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; import { DecimalInput } from "@/components/ui/decimal-input"; import { Label } from "@/components/ui/label"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; -import { getSDKTheme } from "../../../../../../../../components/sdk-component-theme"; +import { parseError } from "@/utils/errorParser"; +import { tryCatch } from "@/utils/try-catch"; +import { getSDKTheme } from "../../../../../../../../../../@/utils/sdk-component-theme"; import { PublicPageConnectButton } from "../../../_components/PublicPageConnectButton"; import { SupplyClaimedProgress } from "../../../_components/supply-claimed-progress"; import { TokenPrice } from "../../../_components/token-price"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/nft-page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/nft-page.tsx index ef2839dcf06..6ebedb60608 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/nft-page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/nft-page.tsx @@ -2,10 +2,10 @@ import type { ThirdwebContract } from "thirdweb"; import type { ChainMetadata } from "thirdweb/chains"; import { getContractMetadata } from "thirdweb/extensions/common"; import { isTokenByIndexSupported } from "thirdweb/extensions/erc721"; -import { ResponsiveLayout } from "@/components/Responsive"; +import { ResponsiveLayout } from "@/components/blocks/Responsive"; import { Skeleton } from "@/components/ui/skeleton"; +import { resolveFunctionSelectors } from "@/lib/selectors"; import { cn } from "@/lib/utils"; -import { resolveFunctionSelectors } from "../../../../../../../../lib/selectors"; import { NFTPublicPageLayout } from "./nft-page-layout"; import { BuyNFTDropCardServer, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-edition-drop/buy-edition-drop.client.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-edition-drop/buy-edition-drop.client.tsx index 2715d9ae0b0..14f22c2bf4a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-edition-drop/buy-edition-drop.client.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-edition-drop/buy-edition-drop.client.tsx @@ -2,7 +2,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useQueryClient } from "@tanstack/react-query"; -import { TransactionButton } from "components/buttons/TransactionButton"; import { CircleAlertIcon } from "lucide-react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; @@ -11,12 +10,12 @@ import type { ChainMetadata } from "thirdweb/chains"; import { getApprovalForTransaction } from "thirdweb/extensions/erc20"; import { claimTo } from "thirdweb/extensions/erc1155"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; -import { parseError } from "utils/errorParser"; import * as z from "zod"; import { reportAssetBuyFailed, reportAssetBuySuccessful, } from "@/analytics/report"; +import { TransactionButton } from "@/components/tx-button"; import { Form, FormControl, @@ -28,6 +27,7 @@ import { import { Input } from "@/components/ui/input"; import { Skeleton } from "@/components/ui/skeleton"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { parseError } from "@/utils/errorParser"; import { PublicPageConnectButton } from "../../../_components/PublicPageConnectButton"; import { SupplyClaimedProgress } from "../../../_components/supply-claimed-progress"; import { TokenPrice } from "../../../_components/token-price"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop-ui.client.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop-ui.client.tsx index 17592479fc6..4150a45917d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop-ui.client.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop-ui.client.tsx @@ -2,7 +2,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useQuery } from "@tanstack/react-query"; -import { TransactionButton } from "components/buttons/TransactionButton"; import { CircleAlertIcon } from "lucide-react"; import { type UseFormReturn, useForm } from "react-hook-form"; import type { NFT, ThirdwebClient } from "thirdweb"; @@ -11,6 +10,7 @@ import type { ChainMetadata } from "thirdweb/chains"; import type { getActiveClaimCondition } from "thirdweb/extensions/erc721"; import * as z from "zod"; import { CustomMediaRenderer } from "@/components/blocks/media-renderer"; +import { TransactionButton } from "@/components/tx-button"; import { Form, FormControl, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop-ui.stories.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop-ui.stories.tsx index 1f48bb4a042..4240eca23fd 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop-ui.stories.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop-ui.stories.tsx @@ -1,9 +1,9 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { storybookLog, storybookThirdwebClient } from "stories/utils"; import { getContract, NATIVE_TOKEN_ADDRESS, type NFT, toUnits } from "thirdweb"; import { baseSepolia, type ChainMetadata } from "thirdweb/chains"; import type { getActiveClaimCondition } from "thirdweb/extensions/erc721"; import { ThirdwebProvider, useActiveAccount } from "thirdweb/react"; +import { storybookLog, storybookThirdwebClient } from "@/storybook/utils"; import { PublicPageConnectButton } from "../../../_components/PublicPageConnectButton"; import { BuyNFTDropUI, type BuyNFTDropUIProps } from "./buy-nft-drop-ui.client"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop.client.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop.client.tsx index 2b91bdc348d..dbd48a3f940 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop.client.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/buy-nft-drop/buy-nft-drop.client.tsx @@ -6,11 +6,11 @@ import { getApprovalForTransaction } from "thirdweb/extensions/erc20"; import { claimTo, getNFT } from "thirdweb/extensions/erc721"; import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react"; import { getClaimParams } from "thirdweb/utils"; -import { parseError } from "utils/errorParser"; import { reportAssetBuyFailed, reportAssetBuySuccessful, } from "@/analytics/report"; +import { parseError } from "@/utils/errorParser"; import { getCurrencyMeta } from "../../../erc20/_utils/getCurrencyMeta"; import { type BuyNFTDropForm, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nfts-grid.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nfts-grid.tsx index 3be8aefa9bf..8afbb9c0302 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nfts-grid.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nfts-grid.tsx @@ -9,7 +9,7 @@ import * as ERC1155Ext from "thirdweb/extensions/erc1155"; import { useReadContract } from "thirdweb/react"; import { maxUint256 } from "thirdweb/utils"; import { CustomMediaRenderer } from "@/components/blocks/media-renderer"; -import { PaginationButtons } from "@/components/pagination-buttons"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; import { Skeleton, SkeletonContainer } from "@/components/ui/skeleton"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/token-viewer/token-viewer.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/token-viewer/token-viewer.tsx index 8e8fb7340af..74508b28c30 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/token-viewer/token-viewer.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/token-viewer/token-viewer.tsx @@ -28,7 +28,7 @@ import { import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; import { Skeleton, SkeletonContainer } from "@/components/ui/skeleton"; import { TabButtons } from "@/components/ui/tabs"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; import { useERC1155ClaimCondition } from "../client-utils"; import { BuyEditionDrop } from "../overview/buy-edition-drop/buy-edition-drop.client"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/detected-state.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/detected-state.tsx index b206bc731d2..9df4869ee9b 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/detected-state.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/detected-state.tsx @@ -1,7 +1,7 @@ -import type { ExtensionDetectedState } from "components/buttons/ExtensionDetectedState"; import { Grid2x2XIcon } from "lucide-react"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; +import type { ExtensionDetectedState } from "@/types/ExtensionDetectedState"; const settingTypeMap = { metadata: { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/metadata.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/metadata.tsx index f5332c66149..807249aca2a 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/metadata.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/metadata.tsx @@ -1,6 +1,5 @@ "use client"; -import { AdminOnly } from "@3rdweb-sdk/react/components/roles/admin-only"; import { Flex, FormControl, @@ -9,11 +8,11 @@ import { Textarea, } from "@chakra-ui/react"; import { zodResolver } from "@hookform/resolvers/zod"; -import type { ExtensionDetectedState } from "components/buttons/ExtensionDetectedState"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { FileInput } from "components/shared/FileInput"; -import { CommonContractSchema } from "constants/schemas"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { Card } from "chakra/card"; +import { FormErrorMessage, FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { PlusIcon, Trash2Icon } from "lucide-react"; import { useMemo } from "react"; import { useFieldArray, useForm } from "react-hook-form"; @@ -24,15 +23,13 @@ import { } from "thirdweb/extensions/common"; import { useReadContract, useSendAndConfirmTransaction } from "thirdweb/react"; import { resolveScheme } from "thirdweb/storage"; -import { - Button, - Card, - FormErrorMessage, - FormLabel, - Heading, - Text, -} from "tw-components"; import { z } from "zod"; +import { FileInput } from "@/components/blocks/FileInput"; +import { AdminOnly } from "@/components/contracts/roles/admin-only"; +import { TransactionButton } from "@/components/tx-button"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { CommonContractSchema } from "@/schema/schemas"; +import type { ExtensionDetectedState } from "@/types/ExtensionDetectedState"; import { SettingDetectedState } from "./detected-state"; const DashboardCommonContractSchema = CommonContractSchema.extend({ diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx index 79f83543a83..c7294408fab 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx @@ -1,13 +1,10 @@ "use client"; -import { AdminOnly } from "@3rdweb-sdk/react/components/roles/admin-only"; import { Flex, FormControl } from "@chakra-ui/react"; import { zodResolver } from "@hookform/resolvers/zod"; -import type { ExtensionDetectedState } from "components/buttons/ExtensionDetectedState"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { BasisPointsInput } from "components/inputs/BasisPointsInput"; -import { AddressOrEnsSchema, BasisPointsSchema } from "constants/schemas"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Card } from "chakra/card"; +import { FormErrorMessage, FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { useForm } from "react-hook-form"; import type { ThirdwebContract } from "thirdweb"; import { @@ -19,14 +16,14 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; -import { - Card, - FormErrorMessage, - FormLabel, - Heading, - Text, -} from "tw-components"; import z from "zod"; +import { BasisPointsInput } from "@/components/blocks/BasisPointsInput"; +import { AdminOnly } from "@/components/contracts/roles/admin-only"; +import { SolidityInput } from "@/components/solidity-inputs"; +import { TransactionButton } from "@/components/tx-button"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { AddressOrEnsSchema, BasisPointsSchema } from "@/schema/schemas"; +import type { ExtensionDetectedState } from "@/types/ExtensionDetectedState"; import { SettingDetectedState } from "./detected-state"; // @internal diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/primary-sale.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/primary-sale.tsx index 10065d9d2b1..aa83570824d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/primary-sale.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/primary-sale.tsx @@ -1,13 +1,10 @@ "use client"; -import { AdminOnly } from "@3rdweb-sdk/react/components/roles/admin-only"; import { Flex, FormControl } from "@chakra-ui/react"; import { zodResolver } from "@hookform/resolvers/zod"; -import type { ExtensionDetectedState } from "components/buttons/ExtensionDetectedState"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { AddressOrEnsSchema } from "constants/schemas"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; - -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Card } from "chakra/card"; +import { FormErrorMessage, FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { type ThirdwebContract, ZERO_ADDRESS } from "thirdweb"; @@ -20,14 +17,13 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; -import { - Card, - FormErrorMessage, - FormLabel, - Heading, - Text, -} from "tw-components"; import { z } from "zod"; +import { AdminOnly } from "@/components/contracts/roles/admin-only"; +import { SolidityInput } from "@/components/solidity-inputs"; +import { TransactionButton } from "@/components/tx-button"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { AddressOrEnsSchema } from "@/schema/schemas"; +import type { ExtensionDetectedState } from "@/types/ExtensionDetectedState"; import { SettingDetectedState } from "./detected-state"; const CommonPrimarySaleSchema = z.object({ diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx index 86f77231407..cbd774356c7 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx @@ -1,13 +1,10 @@ "use client"; -import { AdminOnly } from "@3rdweb-sdk/react/components/roles/admin-only"; import { Flex, FormControl } from "@chakra-ui/react"; import { zodResolver } from "@hookform/resolvers/zod"; -import type { ExtensionDetectedState } from "components/buttons/ExtensionDetectedState"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { BasisPointsInput } from "components/inputs/BasisPointsInput"; -import { AddressOrEnsSchema, BasisPointsSchema } from "constants/schemas"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Card } from "chakra/card"; +import { FormErrorMessage, FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { useForm } from "react-hook-form"; import type { ThirdwebContract } from "thirdweb"; import { @@ -19,14 +16,14 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; -import { - Card, - FormErrorMessage, - FormLabel, - Heading, - Text, -} from "tw-components"; import { z } from "zod"; +import { BasisPointsInput } from "@/components/blocks/BasisPointsInput"; +import { AdminOnly } from "@/components/contracts/roles/admin-only"; +import { SolidityInput } from "@/components/solidity-inputs"; +import { TransactionButton } from "@/components/tx-button"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { AddressOrEnsSchema, BasisPointsSchema } from "@/schema/schemas"; +import type { ExtensionDetectedState } from "@/types/ExtensionDetectedState"; import { SettingDetectedState } from "./detected-state"; /** diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/shared-settings-page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/shared-settings-page.tsx index ca085b58d08..699078b3f18 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/shared-settings-page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/shared-settings-page.tsx @@ -1,7 +1,7 @@ -import { DEFAULT_FEE_RECIPIENT } from "constants/addresses"; import { notFound } from "next/navigation"; import type { ThirdwebContract } from "thirdweb"; import { getPlatformFeeInfo } from "thirdweb/extensions/common"; +import { DEFAULT_FEE_RECIPIENT } from "@/constants/addresses"; import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { redirectToContractLandingPage } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/utils"; import { getContractPageParamsInfo } from "../_utils/getContractFromParams"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx index 54978bd3dbb..5d380ae2dbe 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx @@ -1,13 +1,13 @@ -import type { MinimalTeamsAndProjects } from "components/contract-components/contract-deploy-form/add-to-project-card"; -import { resolveFunctionSelectors } from "lib/selectors"; import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { getContractMetadata } from "thirdweb/extensions/common"; import { isAddress, isContractDeployed } from "thirdweb/utils"; -import { shortenIfAddress } from "utils/usedapp-external"; import { getProjects } from "@/api/projects"; import { getTeams } from "@/api/team"; +import type { MinimalTeamsAndProjects } from "@/components/contract-components/contract-deploy-form/add-to-project-card"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { resolveFunctionSelectors } from "@/lib/selectors"; +import { shortenIfAddress } from "@/utils/usedapp-external"; import type { ProjectMeta } from "../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; import { TeamHeader } from "../../../../team/components/TeamHeader/team-header"; import { ConfigureCustomChain } from "./_layout/ConfigureCustomChain"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/sources/ContractSourcesPage.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/sources/ContractSourcesPage.tsx index bb31e88e8ba..82f36521a83 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/sources/ContractSourcesPage.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/sources/ContractSourcesPage.tsx @@ -1,9 +1,6 @@ "use client"; -import { useResolveContractAbi } from "@3rdweb-sdk/react/hooks/useResolveContractAbi"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { SourcesPanel } from "components/contract-components/shared/sources-panel"; -import { useContractSources } from "contract-ui/hooks/useContractSources"; import { CircleCheckIcon, CircleXIcon, @@ -14,6 +11,7 @@ import { useMemo } from "react"; import { toast } from "sonner"; import type { ThirdwebContract } from "thirdweb"; import { GenericLoadingPage } from "@/components/blocks/skeletons/GenericLoadingPage"; +import { SourcesPanel } from "@/components/contract-components/shared/sources-panel"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -23,6 +21,8 @@ import { DialogTrigger, } from "@/components/ui/dialog"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { useContractSources } from "@/hooks/contract-ui/useContractSources"; +import { useResolveContractAbi } from "@/hooks/useResolveContractAbi"; import { useDashboardRouter } from "@/lib/DashboardRouter"; type VerificationResult = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/ContractSplitPage.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/ContractSplitPage.tsx index 55cc0cfc6e2..405390b29b9 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/ContractSplitPage.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/ContractSplitPage.tsx @@ -1,6 +1,5 @@ "use client"; -import { useSplitBalances } from "@3rdweb-sdk/react/hooks/useSplit"; import { Flex, SimpleGrid, @@ -9,7 +8,9 @@ import { StatLabel, StatNumber, } from "@chakra-ui/react"; -import { useAllChainsData } from "hooks/chains/allChains"; +import { Card } from "chakra/card"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { useMemo } from "react"; import { type ThirdwebContract, @@ -23,8 +24,9 @@ import { useReadContract, useWalletBalance, } from "thirdweb/react"; -import { Card, Heading, Text } from "tw-components"; -import { shortenIfAddress } from "utils/usedapp-external"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { useSplitBalances } from "@/hooks/useSplit"; +import { shortenIfAddress } from "@/utils/usedapp-external"; import { DistributeButton } from "./components/distribute-button"; export type Balance = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/components/distribute-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/components/distribute-button.tsx index dbc10627113..45389286328 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/components/distribute-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/components/distribute-button.tsx @@ -1,11 +1,11 @@ "use client"; -import { useSplitDistributeFunds } from "@3rdweb-sdk/react/hooks/useSplit"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { useMemo } from "react"; import type { ThirdwebContract } from "thirdweb"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; +import { useSplitDistributeFunds } from "@/hooks/useSplit"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import type { Balance } from "../ContractSplitPage"; interface DistributeButtonProps { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/ContractTokensPage.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/ContractTokensPage.tsx index 87cc509c228..b09c9acddda 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/ContractTokensPage.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/ContractTokensPage.tsx @@ -1,6 +1,9 @@ "use client"; +import { LinkButton } from "chakra/button"; +import { Card } from "chakra/card"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import type { ThirdwebContract } from "thirdweb"; -import { Card, Heading, LinkButton, Text } from "tw-components"; import { TokenAirdropButton } from "./components/airdrop-button"; import { TokenBurnButton } from "./components/burn-button"; import { TokenClaimButton } from "./components/claim-button"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-form.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-form.tsx index ec95dd8b45e..6eec90fc0fe 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-form.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-form.tsx @@ -1,14 +1,15 @@ "use client"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { Text } from "chakra/text"; import { CircleCheckIcon, UploadIcon } from "lucide-react"; import { type Dispatch, type SetStateAction, useState } from "react"; import { useForm } from "react-hook-form"; import type { ThirdwebContract } from "thirdweb"; import { transferBatch } from "thirdweb/extensions/erc20"; import { useSendAndConfirmTransaction } from "thirdweb/react"; -import { Button, Text } from "tw-components"; +import { TransactionButton } from "@/components/tx-button"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import { type AirdropAddressInput, AirdropUpload } from "./airdrop-upload"; interface TokenAirdropFormProps { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-upload.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-upload.tsx index 9818a6bb45a..45fdbaff54b 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-upload.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-upload.tsx @@ -1,14 +1,16 @@ import { Link } from "@chakra-ui/react"; -import { useCsvUpload } from "hooks/useCsvUpload"; +import { Button } from "chakra/button"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { CircleAlertIcon, UploadIcon } from "lucide-react"; import { useMemo, useRef } from "react"; import { useDropzone } from "react-dropzone"; import type { Column } from "react-table"; import { type ThirdwebClient, ZERO_ADDRESS } from "thirdweb"; -import { Button, Heading, Text } from "tw-components"; import { UnorderedList } from "@/components/ui/List/List"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useCsvUpload } from "@/hooks/useCsvUpload"; import { cn } from "@/lib/utils"; import { CsvDataTable } from "../../_components/csv-data-table"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/burn-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/burn-button.tsx index 04673d952f5..134a45c7c9f 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/burn-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/burn-button.tsx @@ -1,7 +1,8 @@ "use client"; import { FormControl, Input } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { FlameIcon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; @@ -13,12 +14,7 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; -import { - FormErrorMessage, - FormHelperText, - FormLabel, - Text, -} from "tw-components"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; import { Sheet, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/claim-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/claim-button.tsx index 74753fc797a..4e00a03c672 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/claim-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/claim-button.tsx @@ -1,8 +1,7 @@ "use client"; import { FormControl, Input } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; import { GemIcon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; @@ -14,7 +13,7 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; -import { FormErrorMessage, FormHelperText, FormLabel } from "tw-components"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; import { Sheet, @@ -24,6 +23,7 @@ import { SheetTitle, SheetTrigger, } from "@/components/ui/sheet"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface TokenClaimButtonProps { contract: ThirdwebContract; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/mint-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/mint-button.tsx index c21dea948f9..83b0ebbee42 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/mint-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/mint-button.tsx @@ -1,8 +1,7 @@ "use client"; -import { MinterOnly } from "@3rdweb-sdk/react/components/roles/minter-only"; import { FormControl, Input } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; +import { FormErrorMessage, FormLabel } from "chakra/form"; import { PlusIcon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; @@ -14,7 +13,8 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; -import { FormErrorMessage, FormLabel } from "tw-components"; +import { MinterOnly } from "@/components/contracts/roles/minter-only"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; import { Sheet, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/transfer-button.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/transfer-button.tsx index b290561be10..604948016fe 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/transfer-button.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/transfer-button.tsx @@ -1,8 +1,7 @@ "use client"; import { FormControl, Input } from "@chakra-ui/react"; -import { TransactionButton } from "components/buttons/TransactionButton"; -import { SolidityInput } from "contract-ui/components/solidity-inputs"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; import { SendIcon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; @@ -14,7 +13,8 @@ import { useReadContract, useSendAndConfirmTransaction, } from "thirdweb/react"; -import { FormErrorMessage, FormHelperText, FormLabel } from "tw-components"; +import { SolidityInput } from "@/components/solidity-inputs"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; import { Sheet, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/page.tsx index 2a1337a3660..30a264f1b78 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/page.tsx @@ -1,4 +1,3 @@ -import { mapV4ChainToV5Chain } from "contexts/map-chains"; import { toTokens, ZERO_ADDRESS } from "thirdweb"; import { eth_getBlockByHash, @@ -10,6 +9,7 @@ import { hexToNumber, shortenAddress, toEther } from "thirdweb/utils"; import { Badge } from "@/components/ui/badge"; import { Separator } from "@/components/ui/separator"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; +import { mapV4ChainToV5Chain } from "@/utils/map-chains"; import { getChain } from "../../../utils"; export default async function Page(props: { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/[chain_type]/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/[chain_type]/page.tsx index d058a60417a..ee09fffdd39 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/[chain_type]/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/[chain_type]/page.tsx @@ -14,7 +14,7 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { getAuthToken } from "../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../@/api/auth-token"; import { AllFilters, ChainOptionsFilter, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/client/pagination.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/client/pagination.tsx index 019b21bfb80..dd036009634 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/client/pagination.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/client/pagination.tsx @@ -2,7 +2,7 @@ import { usePathname, useSearchParams } from "next/navigation"; import { useCallback } from "react"; -import { PaginationButtons } from "@/components/pagination-buttons"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; import { useDashboardRouter } from "@/lib/DashboardRouter"; type ChainlistPaginationProps = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chain-table.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chain-table.tsx index 859556b5e2d..33824285304 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chain-table.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chain-table.tsx @@ -7,11 +7,11 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; -import { StarButton } from "../../../components/client/star-button"; import type { ChainMetadataWithServices, ChainSupportedService, -} from "../../../types/chain"; +} from "@/types/chain"; +import { StarButton } from "../../../components/client/star-button"; import { getChainsWithServices } from "../../../utils"; import { ChainlistPagination } from "../client/pagination"; import { ChainListCard } from "../server/chainlist-card"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-card.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-card.tsx index 678ab2c5ced..58205d2ad0c 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-card.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-card.tsx @@ -3,8 +3,8 @@ import Link from "next/link"; import type { JSX } from "react"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import type { ChainSupportedService } from "@/types/chain"; import { ChainIcon } from "../../../components/server/chain-icon"; -import type { ChainSupportedService } from "../../../types/chain"; import { getChainMetadata } from "../../../utils"; type ChainListCardProps = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx index 379295bd5b4..a95bed9669d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx @@ -10,9 +10,9 @@ import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { TableCell, TableRow } from "@/components/ui/table"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; +import type { ChainSupportedService } from "@/types/chain"; import { ChainIcon } from "../../../components/server/chain-icon"; import { products } from "../../../components/server/products"; -import type { ChainSupportedService } from "../../../types/chain"; import { getChainMetadata } from "../../../utils"; type ChainListRowProps = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/page.tsx index 3dc4071e630..9423318c5f8 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/page.tsx @@ -1,6 +1,6 @@ import type { Metadata } from "next"; import { headers } from "next/headers"; -import { getAuthToken } from "../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../@/api/auth-token"; import { AllFilters, ChainOptionsFilter, diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/chain-icon.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/chain-icon.tsx index 254ab94e34c..e73a1e0fa7d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/chain-icon.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/chain-icon.tsx @@ -2,9 +2,9 @@ import "server-only"; import { DASHBOARD_THIRDWEB_SECRET_KEY } from "@/constants/server-envs"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; import { cn } from "@/lib/utils"; -import { fallbackChainIcon } from "../../../../../../utils/chain-icons"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; +import { fallbackChainIcon } from "../../../../../../@/utils/chain-icons"; export async function ChainIcon(props: { iconUrl?: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/products.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/products.ts index 10a4fe39a3d..dad6a1aac7d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/products.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/products.ts @@ -1,12 +1,12 @@ -import type { ChainSupportedService } from "../../types/chain"; -import { ConnectSDKIcon } from "./icons/ConnectSDKIcon"; -import { ContractIcon } from "./icons/ContractIcon"; -import { EngineIcon } from "./icons/EngineIcon"; -import { InsightIcon } from "./icons/InsightIcon"; -import { NebulaIcon } from "./icons/NebulaIcon"; -import { PayIcon } from "./icons/PayIcon"; -import { RPCIcon } from "./icons/RPCIcon"; -import { SmartAccountIcon } from "./icons/SmartAccountIcon"; +import { ConnectSDKIcon } from "@/icons/ConnectSDKIcon"; +import { ContractIcon } from "@/icons/ContractIcon"; +import { EngineIcon } from "@/icons/EngineIcon"; +import { InsightIcon } from "@/icons/InsightIcon"; +import { NebulaIcon } from "@/icons/NebulaIcon"; +import { PayIcon } from "@/icons/PayIcon"; +import { RPCIcon } from "@/icons/RPCIcon"; +import { SmartAccountIcon } from "@/icons/SmartAccountIcon"; +import type { ChainSupportedService } from "@/types/chain"; export const products = [ { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/utils.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/utils.ts index c4aef39fc49..408d45be040 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/utils.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/utils.ts @@ -1,6 +1,14 @@ import "server-only"; import { notFound } from "next/navigation"; +import type { ChainMetadata } from "thirdweb/chains"; +import { + getChainServices, + getChains, + getGasSponsoredChains, +} from "@/api/chain"; +import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; +import type { ChainMetadataWithServices, ChainServices } from "@/types/chain"; import type { ChainCTAProps } from "./[chain_id]/(chainPage)/components/server/cta-card"; import zeroGCTA from "./temp-assets/0gCTA.png"; import zeroGBanner from "./temp-assets/0gLabsBanner.png"; @@ -79,18 +87,8 @@ import zetachainCTA from "./temp-assets/zetachainCTA.png"; import zkCandyBanner from "./temp-assets/zkCandyBanner.jpg"; import zytronBanner from "./temp-assets/zytronBanner.png"; import zytronCTA from "./temp-assets/zytronCTA.jpg"; - // END TEMPORARY -import type { ChainMetadata } from "thirdweb/chains"; -import { - getChainServices, - getChains, - getGasSponsoredChains, -} from "@/api/chain"; -import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; -import type { ChainMetadataWithServices, ChainServices } from "./types/chain"; - export async function getChainsWithServices() { const [chains, chainServices] = await Promise.all([ getChains(), diff --git a/apps/dashboard/src/app/(app)/(dashboard)/contracts/deploy/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/contracts/deploy/page.tsx index 6cc53273785..b5adc054095 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/contracts/deploy/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/contracts/deploy/page.tsx @@ -1,8 +1,8 @@ -import { DeployableContractTable } from "components/contract-components/contract-table"; import Link from "next/link"; import { notFound } from "next/navigation"; import { Suspense } from "react"; import { GenericLoadingPage } from "@/components/blocks/skeletons/GenericLoadingPage"; +import { DeployableContractTable } from "@/components/contracts/contract-table"; export default async function DeployMultipleContractsPage(props: { searchParams?: Promise<{ diff --git a/apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/[publish_uri]/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/[publish_uri]/page.tsx index 8dd725007fd..e945cc99c8d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/[publish_uri]/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/[publish_uri]/page.tsx @@ -1,8 +1,8 @@ -import { ContractPublishForm } from "components/contract-components/contract-publish-form"; +import { ChakraProviderSetup } from "chakra/ChakraProviderSetup"; import { revalidatePath } from "next/cache"; import { notFound, redirect } from "next/navigation"; import { fetchDeployMetadata } from "thirdweb/contract"; -import { ChakraProviderSetup } from "@/components/ChakraProviderSetup"; +import { ContractPublishForm } from "@/components/contract-components/contract-publish-form"; import { getActiveAccountCookie, getJWTCookie } from "@/constants/cookie"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/page.tsx index 8072e229d0e..c85e98c1fb8 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/page.tsx @@ -1,8 +1,8 @@ -import { DeployableContractTable } from "components/contract-components/contract-table"; import Link from "next/link"; import { notFound } from "next/navigation"; import { Suspense } from "react"; import { GenericLoadingPage } from "@/components/blocks/skeletons/GenericLoadingPage"; +import { DeployableContractTable } from "@/components/contracts/contract-table"; export default async function PublishMultipleContractsPage(props: { searchParams?: Promise<{ diff --git a/apps/dashboard/src/app/(app)/(dashboard)/explore/[category]/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/explore/[category]/page.tsx index 100cb2c7cc5..4ead9906261 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/explore/[category]/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/explore/[category]/page.tsx @@ -1,13 +1,13 @@ -import { - ContractCard, - ContractCardSkeleton, -} from "components/explore/contract-card"; -import { DeployUpsellCard } from "components/explore/upsells/deploy-your-own"; -import { getCategory } from "data/explore"; +import { DeployUpsellCard } from "@app/(dashboard)/explore/components/upsells/deploy-your-own"; +import { getCategory } from "@app/(dashboard)/explore/data"; import type { Metadata } from "next"; import Link from "next/link"; import { notFound } from "next/navigation"; import { Suspense } from "react"; +import { + ContractCard, + ContractCardSkeleton, +} from "@/components/contracts/contract-card"; import { Breadcrumb, BreadcrumbItem, diff --git a/apps/dashboard/src/components/explore/contract-row/index.tsx b/apps/dashboard/src/app/(app)/(dashboard)/explore/components/contract-row/index.tsx similarity index 94% rename from apps/dashboard/src/components/explore/contract-row/index.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/explore/components/contract-row/index.tsx index 9a144052dc9..d9d11c088f7 100644 --- a/apps/dashboard/src/components/explore/contract-row/index.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/explore/components/contract-row/index.tsx @@ -1,8 +1,11 @@ -import type { ExploreCategory } from "data/explore"; +import type { ExploreCategory } from "@app/(dashboard)/explore/data"; import { ArrowRightIcon } from "lucide-react"; import Link from "next/link"; import { Suspense } from "react"; -import { ContractCard, ContractCardSkeleton } from "../contract-card"; +import { + ContractCard, + ContractCardSkeleton, +} from "../../../../../../@/components/contracts/contract-card"; interface ContractRowProps { category: ExploreCategory; diff --git a/apps/dashboard/src/components/explore/publisher/index.tsx b/apps/dashboard/src/app/(app)/(dashboard)/explore/components/publisher/index.tsx similarity index 91% rename from apps/dashboard/src/components/explore/publisher/index.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/explore/components/publisher/index.tsx index 40fcdc30cc5..1b59c0b9eef 100644 --- a/apps/dashboard/src/components/explore/publisher/index.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/explore/components/publisher/index.tsx @@ -1,6 +1,5 @@ "use client"; -import { replaceDeployerAddress } from "lib/publisher-utils"; import Link from "next/link"; import type { ThirdwebClient } from "thirdweb"; import { @@ -10,8 +9,9 @@ import { AccountName, AccountProvider, } from "thirdweb/react"; -import { shortenIfAddress } from "utils/usedapp-external"; import { Skeleton } from "@/components/ui/skeleton"; +import { replaceDeployerAddress } from "@/lib/publisher-utils"; +import { shortenIfAddress } from "@/utils/usedapp-external"; interface ContractPublisherProps { addressOrEns: string; diff --git a/apps/dashboard/src/components/explore/upsells/deploy-your-own.tsx b/apps/dashboard/src/app/(app)/(dashboard)/explore/components/upsells/deploy-your-own.tsx similarity index 100% rename from apps/dashboard/src/components/explore/upsells/deploy-your-own.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/explore/components/upsells/deploy-your-own.tsx diff --git a/apps/dashboard/src/components/explore/upsells/publish-submit.tsx b/apps/dashboard/src/app/(app)/(dashboard)/explore/components/upsells/publish-submit.tsx similarity index 88% rename from apps/dashboard/src/components/explore/upsells/publish-submit.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/explore/components/upsells/publish-submit.tsx index 83551eeceda..c7878d0d80b 100644 --- a/apps/dashboard/src/components/explore/upsells/publish-submit.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/explore/components/upsells/publish-submit.tsx @@ -1,9 +1,9 @@ import Image from "next/image"; import Link from "next/link"; import { Button } from "@/components/ui/button"; -import exploreFeatureImage from "../../../../public/assets/landingpage/explore-featured.png"; -import heroIcon1 from "../../../../public/assets/product-pages/publish/hero-icon-1.png"; -import heroIcon2 from "../../../../public/assets/product-pages/publish/hero-icon-2.png"; +import exploreFeatureImage from "../../../../../../../public/assets/landingpage/explore-featured.png"; +import heroIcon1 from "../../../../../../../public/assets/product-pages/publish/hero-icon-1.png"; +import heroIcon2 from "../../../../../../../public/assets/product-pages/publish/hero-icon-2.png"; export const PublishUpsellCard: React.FC = () => { return ( diff --git a/apps/dashboard/src/data/explore.ts b/apps/dashboard/src/app/(app)/(dashboard)/explore/data.ts similarity index 100% rename from apps/dashboard/src/data/explore.ts rename to apps/dashboard/src/app/(app)/(dashboard)/explore/data.ts diff --git a/apps/dashboard/src/app/(app)/(dashboard)/explore/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/explore/page.tsx index 4491aac7c7c..7627635c64e 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/explore/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/explore/page.tsx @@ -1,7 +1,7 @@ -import { ContractRow } from "components/explore/contract-row"; -import { DeployUpsellCard } from "components/explore/upsells/deploy-your-own"; -import { PublishUpsellCard } from "components/explore/upsells/publish-submit"; -import { EXPLORE_PAGE_DATA } from "data/explore"; +import { ContractRow } from "@app/(dashboard)/explore/components/contract-row"; +import { DeployUpsellCard } from "@app/(dashboard)/explore/components/upsells/deploy-your-own"; +import { PublishUpsellCard } from "@app/(dashboard)/explore/components/upsells/publish-submit"; +import { EXPLORE_PAGE_DATA } from "@app/(dashboard)/explore/data"; import type { Metadata } from "next"; import { Fragment } from "react"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/layout.tsx b/apps/dashboard/src/app/(app)/(dashboard)/layout.tsx index ad240d4c32e..ace5884a963 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/layout.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/layout.tsx @@ -1,5 +1,5 @@ -import { AppFooter } from "@/components/blocks/app-footer"; -import { ErrorProvider } from "../../../contexts/error-handler"; +import { AppFooter } from "@/components/footers/app-footer"; +import { ErrorProvider } from "../../../@/contexts/error-handler"; export default function DashboardLayout(props: { children: React.ReactNode }) { return ( 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 14d9b797c43..38a9be7f8ed 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/ProfileUI.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/ProfileUI.tsx @@ -1,6 +1,6 @@ -import { fetchPublishedContracts } from "components/contract-components/fetchPublishedContracts"; import { Suspense } from "react"; import type { ThirdwebClient } from "thirdweb"; +import { fetchPublishedContracts } from "@/components/contract-components/fetchPublishedContracts"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { ProfileHeader } from "./components/profile-header"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/PublishedContractTable.tsx b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/PublishedContractTable.tsx index f05283f157e..dad810fd28e 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/PublishedContractTable.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/PublishedContractTable.tsx @@ -1,7 +1,5 @@ /** biome-ignore-all lint/nursery/noNestedComponentDefinitions: FIXME */ -import type { PublishedContractDetails } from "components/contract-components/hooks"; -import { replaceDeployerAddress } from "lib/publisher-utils"; -import { replaceIpfsUrl } from "lib/sdk"; + import { ShieldCheckIcon } from "lucide-react"; import Link from "next/link"; import { useMemo } from "react"; @@ -19,6 +17,9 @@ import { TableRow, } from "@/components/ui/table"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import type { PublishedContractDetails } from "@/hooks/contract-hooks"; +import { replaceDeployerAddress } from "@/lib/publisher-utils"; +import { replaceIpfsUrl } from "@/lib/sdk"; interface PublishedContractTableProps { contractDetails: ContractDataInput[]; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/profile-header.tsx b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/profile-header.tsx index 95a377993ec..78fa609ce98 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/profile-header.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/profile-header.tsx @@ -1,6 +1,5 @@ "use client"; -import { replaceDeployerAddress } from "lib/publisher-utils"; import type { ThirdwebClient } from "thirdweb"; import { AccountAddress, @@ -9,8 +8,9 @@ import { AccountName, AccountProvider, } from "thirdweb/react"; -import { shortenIfAddress } from "utils/usedapp-external"; import { Skeleton } from "@/components/ui/skeleton"; +import { replaceDeployerAddress } from "@/lib/publisher-utils"; +import { shortenIfAddress } from "@/utils/usedapp-external"; export function ProfileHeader(props: { profileAddress: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/published-contracts.tsx b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/published-contracts.tsx index c5a6b26efc7..4a0051a0274 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/published-contracts.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/components/published-contracts.tsx @@ -1,8 +1,8 @@ "use client"; -import type { fetchPublishedContracts } from "components/contract-components/fetchPublishedContracts"; -import { ShowMoreButton } from "components/contract-components/tables/show-more-button"; import { useState } from "react"; +import type { fetchPublishedContracts } from "@/components/contract-components/fetchPublishedContracts"; +import { ShowMoreButton } from "@/components/contract-components/tables/show-more-button"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { PublishedContractTable } from "./PublishedContractTable"; 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 82b178df354..33fa5734563 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 { notFound } from "next/navigation"; import { ImageResponse } from "next/og"; import { resolveAvatar } from "thirdweb/extensions/ens"; -import { shortenIfAddress } from "utils/usedapp-external"; -import { GradientBlobbie } from "@/components/blocks/Avatars/GradientBlobbie"; +import { GradientBlobbie } from "@/components/blocks/avatar/GradientBlobbie"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; /* eslint-disable @next/next/no-img-element */ -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; +import { shortenIfAddress } from "@/utils/usedapp-external"; import { resolveAddressAndEns } from "./resolveAddressAndEns"; export const runtime = "edge"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/page.tsx index 15d991ae814..901c156d9b5 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/page.tsx @@ -1,9 +1,9 @@ -import { replaceDeployerAddress } from "lib/publisher-utils"; import type { Metadata } from "next"; import { notFound } from "next/navigation"; -import { shortenIfAddress } from "utils/usedapp-external"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; +import { replaceDeployerAddress } from "@/lib/publisher-utils"; +import { shortenIfAddress } from "@/utils/usedapp-external"; import { ProfileUI } from "./ProfileUI"; import { resolveAddressAndEns } from "./resolveAddressAndEns"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/resolveAddressAndEns.tsx b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/resolveAddressAndEns.tsx index 4b9c10acff7..6ff49ee002b 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/resolveAddressAndEns.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/profile/[addressOrEns]/resolveAddressAndEns.tsx @@ -1,7 +1,7 @@ -import { mapThirdwebPublisher } from "components/contract-components/fetch-contracts-with-versions"; -import { resolveEns } from "lib/ens"; import { getAddress, isAddress, type ThirdwebClient } from "thirdweb"; import { isValidENSName } from "thirdweb/utils"; +import { mapThirdwebPublisher } from "@/components/contract-components/fetch-contracts-with-versions"; +import { resolveEns } from "@/lib/ens"; type ResolvedAddressInfo = { address: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/opengraph-image.tsx b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/opengraph-image.tsx index 96d5846f5e2..c40d6423d44 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/opengraph-image.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/opengraph-image.tsx @@ -1,8 +1,8 @@ import { format } from "date-fns"; -import { resolveEns } from "lib/ens"; -import { correctAndUniqueLicenses } from "lib/licenses"; import { getSocialProfiles } from "thirdweb/social"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; +import { resolveEns } from "@/lib/ens"; +import { correctAndUniqueLicenses } from "@/lib/licenses"; import { getPublishedContractsWithPublisherMapping } from "../utils/getPublishedContractsWithPublisherMapping"; import { publishedContractOGImageTemplate } from "../utils/publishedContractOGImageTemplate"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/page.tsx index 0c337953221..a54fe3e4958 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/page.tsx @@ -1,14 +1,14 @@ import { SimpleGrid } from "@chakra-ui/react"; -import { fetchPublishedContractVersions } from "components/contract-components/fetch-contracts-with-versions"; -import { PublishedContract } from "components/contract-components/published-contract"; +import { ChakraProviderSetup } from "chakra/ChakraProviderSetup"; import { notFound } from "next/navigation"; import { isAddress } from "thirdweb"; import { resolveAddress } from "thirdweb/extensions/ens"; -import { ChakraProviderSetup } from "@/components/ChakraProviderSetup"; +import { getUserThirdwebClient } from "@/api/auth-token"; +import { fetchPublishedContractVersions } from "@/components/contract-components/fetch-contracts-with-versions"; +import { PublishedContract } from "@/components/contracts/published-contract"; import { Separator } from "@/components/ui/separator"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; import { getRawAccount } from "../../../../../account/settings/getAccount"; -import { getUserThirdwebClient } from "../../../../../api/lib/getAuthToken"; import { PublishedActions } from "../../../components/contract-actions-published.client"; import { DeployContractHeader } from "../../../components/contract-header"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/opengraph-image.tsx b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/opengraph-image.tsx index e78b377845b..96d1fbb0754 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/opengraph-image.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/opengraph-image.tsx @@ -1,8 +1,8 @@ import { format } from "date-fns"; -import { resolveEns } from "lib/ens"; -import { correctAndUniqueLicenses } from "lib/licenses"; import { getSocialProfiles } from "thirdweb/social"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; +import { resolveEns } from "@/lib/ens"; +import { correctAndUniqueLicenses } from "@/lib/licenses"; import { getLatestPublishedContractsWithPublisherMapping } from "./utils/getPublishedContractsWithPublisherMapping"; import { publishedContractOGImageTemplate } from "./utils/publishedContractOGImageTemplate"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/page.tsx index b3f9c018b1f..52308625c47 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/page.tsx @@ -1,11 +1,11 @@ -import { PublishedContract } from "components/contract-components/published-contract"; +import { ChakraProviderSetup } from "chakra/ChakraProviderSetup"; import { notFound } from "next/navigation"; -import { ChakraProviderSetup } from "@/components/ChakraProviderSetup"; +import { PublishedContract } from "@/components/contracts/published-contract"; import { Separator } from "@/components/ui/separator"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; +import { getAuthToken } from "../../../../../../@/api/auth-token"; import { getRawAccount } from "../../../../account/settings/getAccount"; -import { getAuthToken } from "../../../../api/lib/getAuthToken"; import { PublishedActions } from "../../components/contract-actions-published.client"; import { DeployContractHeader } from "../../components/contract-header"; import { getPublishedContractsWithPublisherMapping } from "./utils/getPublishedContractsWithPublisherMapping"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/utils/getPublishedContractsWithPublisherMapping.ts b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/utils/getPublishedContractsWithPublisherMapping.ts index 2d01fb7301a..dc6c90ebb20 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/utils/getPublishedContractsWithPublisherMapping.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/utils/getPublishedContractsWithPublisherMapping.ts @@ -1,9 +1,9 @@ +import { isAddress, type ThirdwebClient } from "thirdweb"; +import { resolveAddress } from "thirdweb/extensions/ens"; import { fetchLatestPublishedContractVersion, fetchPublishedContractVersions, -} from "components/contract-components/fetch-contracts-with-versions"; -import { isAddress, type ThirdwebClient } from "thirdweb"; -import { resolveAddress } from "thirdweb/extensions/ens"; +} from "@/components/contract-components/fetch-contracts-with-versions"; function mapThirdwebPublisher(publisher: string) { if (publisher === "thirdweb.eth") { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-actions-published.client.tsx b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-actions-published.client.tsx index ac85ec66d93..07362f2ad47 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-actions-published.client.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-actions-published.client.tsx @@ -4,7 +4,7 @@ import { ChevronsRightIcon } from "lucide-react"; import Link from "next/link"; import { useSearchParams } from "next/navigation"; import { Button } from "@/components/ui/button"; -import { shareLink } from "@/lib/shareLink"; +import { shareLink } from "@/utils/shareLink"; export function PublishedActions(props: { publisher: string; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-header.tsx b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-header.tsx index 9cf57b5fd0c..0f1aabd6884 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-header.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-header.tsx @@ -1,5 +1,5 @@ -import type { PublishedContractWithVersion } from "components/contract-components/fetch-contracts-with-versions"; import type { PropsWithChildren } from "react"; +import type { PublishedContractWithVersion } from "@/components/contract-components/fetch-contracts-with-versions"; import { ModuleList } from "../[publisher]/[contract_id]/components/module-list.client"; import { DeployContractInfo } from "./contract-info"; import { DeployContractVersionSelector } from "./version-selector"; diff --git a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-info.tsx b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-info.tsx index 6e9126817aa..958bded9118 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-info.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/contract-info.tsx @@ -1,5 +1,5 @@ import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; export function DeployContractInfo(props: { name: string; 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 99d6ad320e2..63289e485a7 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,11 +1,11 @@ -import { - fetchPublishedContractVersion, - fetchPublishedContractVersions, -} from "components/contract-components/fetch-contracts-with-versions"; -import { ZERO_FEE_VERSIONS } from "constants/fee-config"; import { isAddress } from "thirdweb"; import { fetchDeployMetadata } from "thirdweb/contract"; import { resolveAddress } from "thirdweb/extensions/ens"; +import { + fetchPublishedContractVersion, + fetchPublishedContractVersions, +} from "@/components/contract-components/fetch-contracts-with-versions"; +import { ZERO_FEE_VERSIONS } from "@/constants/fee-config"; 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)/published-contract/components/uri-based-deploy.tsx b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/uri-based-deploy.tsx index 20c207653ef..e84603a9e08 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/uri-based-deploy.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/uri-based-deploy.tsx @@ -1,9 +1,9 @@ -import { CustomContractForm } from "components/contract-components/contract-deploy-form/custom-contract"; +import { ChakraProviderSetup } from "chakra/ChakraProviderSetup"; import type { FetchDeployMetadataResult } from "thirdweb/contract"; +import { getUserThirdwebClient } from "@/api/auth-token"; import { getProjects } from "@/api/projects"; import { getTeams } from "@/api/team"; -import { ChakraProviderSetup } from "@/components/ChakraProviderSetup"; -import { getUserThirdwebClient } from "../../../api/lib/getAuthToken"; +import { CustomContractForm } from "@/components/contract-components/contract-deploy-form/custom-contract"; import { loginRedirect } from "../../../login/loginRedirect"; type DeployFormForUriProps = { diff --git a/apps/dashboard/src/components/help/contact-forms/account/index.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/account/index.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/account/index.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/account/index.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/connect/AffectedAreaInput.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/connect/AffectedAreaInput.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/connect/AffectedAreaInput.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/connect/AffectedAreaInput.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/connect/index.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/connect/index.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/connect/index.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/connect/index.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/contracts/index.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/contracts/index.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/contracts/index.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/contracts/index.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/engine/index.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/engine/index.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/engine/index.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/engine/index.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/other/index.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/other/index.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/other/index.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/other/index.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/shared/SupportForm_AttachmentUploader.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_AttachmentUploader.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/shared/SupportForm_AttachmentUploader.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_AttachmentUploader.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/shared/SupportForm_DescriptionInput.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_DescriptionInput.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/shared/SupportForm_DescriptionInput.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_DescriptionInput.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/shared/SupportForm_SelectInput.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_SelectInput.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/shared/SupportForm_SelectInput.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_SelectInput.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/shared/SupportForm_TeamSelection.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_TeamSelection.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/shared/SupportForm_TeamSelection.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_TeamSelection.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/shared/SupportForm_TelegramInput.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_TelegramInput.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/shared/SupportForm_TelegramInput.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_TelegramInput.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/shared/SupportForm_TextInput.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_TextInput.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/shared/SupportForm_TextInput.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_TextInput.tsx diff --git a/apps/dashboard/src/components/help/contact-forms/shared/SupportForm_UnityInput.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_UnityInput.tsx similarity index 100% rename from apps/dashboard/src/components/help/contact-forms/shared/SupportForm_UnityInput.tsx rename to apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_UnityInput.tsx diff --git a/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/create-ticket.action.ts b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/create-ticket.action.ts index 14234c20a56..8019ae07d18 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/create-ticket.action.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/create-ticket.action.ts @@ -2,8 +2,8 @@ import "server-only"; import { getTeamById } from "@/api/team"; +import { getAuthTokenWalletAddress } from "../../../../../../@/api/auth-token"; import { getRawAccount } from "../../../../account/settings/getAccount"; -import { getAuthTokenWalletAddress } from "../../../../api/lib/getAuthToken"; import { loginRedirect } from "../../../../login/loginRedirect"; type State = { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/create-ticket.client.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/create-ticket.client.tsx index 1251f18937d..6b34630770f 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/create-ticket.client.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/support/create-ticket/components/create-ticket.client.tsx @@ -1,8 +1,8 @@ "use client"; -import { SupportForm_SelectInput } from "components/help/contact-forms/shared/SupportForm_SelectInput"; -import { SupportForm_TeamSelection } from "components/help/contact-forms/shared/SupportForm_TeamSelection"; -import { SupportForm_TelegramInput } from "components/help/contact-forms/shared/SupportForm_TelegramInput"; +import { SupportForm_SelectInput } from "@app/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_SelectInput"; +import { SupportForm_TeamSelection } from "@app/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_TeamSelection"; +import { SupportForm_TelegramInput } from "@app/(dashboard)/support/create-ticket/components/contact-forms/shared/SupportForm_TelegramInput"; import dynamic from "next/dynamic"; import { type ReactElement, @@ -19,41 +19,26 @@ import { Skeleton } from "@/components/ui/skeleton"; import { cn } from "@/lib/utils"; import { createTicketAction } from "./create-ticket.action"; -const ConnectSupportForm = dynamic( - () => import("../../../../../../components/help/contact-forms/connect"), - { - loading: () => , - ssr: false, - }, -); -const EngineSupportForm = dynamic( - () => import("../../../../../../components/help/contact-forms/engine"), - { - loading: () => , - ssr: false, - }, -); -const ContractSupportForm = dynamic( - () => import("../../../../../../components/help/contact-forms/contracts"), - { - loading: () => , - ssr: false, - }, -); -const AccountSupportForm = dynamic( - () => import("../../../../../../components/help/contact-forms/account"), - { - loading: () => , - ssr: false, - }, -); -const OtherSupportForm = dynamic( - () => import("../../../../../../components/help/contact-forms/other"), - { - loading: () => , - ssr: false, - }, -); +const ConnectSupportForm = dynamic(() => import("./contact-forms/connect"), { + loading: () => , + ssr: false, +}); +const EngineSupportForm = dynamic(() => import("./contact-forms/engine"), { + loading: () => , + ssr: false, +}); +const ContractSupportForm = dynamic(() => import("./contact-forms/contracts"), { + loading: () => , + ssr: false, +}); +const AccountSupportForm = dynamic(() => import("./contact-forms/account"), { + loading: () => , + ssr: false, +}); +const OtherSupportForm = dynamic(() => import("./contact-forms/other"), { + loading: () => , + ssr: false, +}); const productOptions: { label: string; component: ReactElement }[] = [ { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/support/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/support/page.tsx index 9c24db20de2..a37c5e2cc44 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/support/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/support/page.tsx @@ -6,18 +6,15 @@ import { } from "lucide-react"; import type { Metadata } from "next"; import Link from "next/link"; +import { getAuthToken, getAuthTokenWalletAddress } from "@/api/auth-token"; import { getTeams } from "@/api/team"; +import { CustomChatButton } from "@/components/chat/CustomChatButton"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; -import { CustomChatButton } from "../../../../components/CustomChat/CustomChatButton"; -import { EngineIcon } from "../../(dashboard)/(chain)/components/server/icons/EngineIcon"; -import { InsightIcon } from "../../(dashboard)/(chain)/components/server/icons/InsightIcon"; -import { PayIcon } from "../../(dashboard)/(chain)/components/server/icons/PayIcon"; -import { - getAuthToken, - getAuthTokenWalletAddress, -} from "../../api/lib/getAuthToken"; -import { NebulaIcon } from "../(chain)/components/server/icons/NebulaIcon"; +import { EngineIcon } from "@/icons/EngineIcon"; +import { InsightIcon } from "@/icons/InsightIcon"; +import { NebulaIcon } from "@/icons/NebulaIcon"; +import { PayIcon } from "@/icons/PayIcon"; import { siwaExamplePrompts } from "./definitions"; export const metadata: Metadata = { 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 6df60bccceb..a816d9ceb93 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 @@ -1,6 +1,5 @@ "use client"; import type { Abi, AbiFunction } from "abitype"; -import { useV5DashboardChain } from "lib/v5-adapter"; import { ArrowDownIcon, WalletIcon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; @@ -25,6 +24,7 @@ import { Spinner } from "@/components/ui/Spinner/Spinner"; import { Textarea } from "@/components/ui/textarea"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; import { ShareButton } from "../../components/share"; export type SimulateTransactionForm = { diff --git a/apps/dashboard/src/app/(app)/(stripe)/checkout/[team_slug]/[sku]/page.tsx b/apps/dashboard/src/app/(app)/(stripe)/checkout/[team_slug]/[sku]/page.tsx index e2f75be2416..c7751567de3 100644 --- a/apps/dashboard/src/app/(app)/(stripe)/checkout/[team_slug]/[sku]/page.tsx +++ b/apps/dashboard/src/app/(app)/(stripe)/checkout/[team_slug]/[sku]/page.tsx @@ -1,5 +1,5 @@ import { redirect } from "next/navigation"; -import type { ProductSKU } from "@/lib/billing"; +import type { ProductSKU } from "@/types/billing"; import { StripeRedirectErrorPage } from "../../../_components/StripeRedirectErrorPage"; import { getBillingCheckoutUrl, diff --git a/apps/dashboard/src/app/(app)/(stripe)/stripe-redirect/page.tsx b/apps/dashboard/src/app/(app)/(stripe)/stripe-redirect/page.tsx index c71930a29ea..55909d9d6d6 100644 --- a/apps/dashboard/src/app/(app)/(stripe)/stripe-redirect/page.tsx +++ b/apps/dashboard/src/app/(app)/(stripe)/stripe-redirect/page.tsx @@ -2,7 +2,7 @@ import { useEffect } from "react"; import { Spinner } from "@/components/ui/Spinner/Spinner"; -import { stripeRedirectPageChannel } from "./stripeRedirectChannel"; +import { stripeRedirectPageChannel } from "@/hooks/stripe/redirect-event"; export default function ClosePage() { // eslint-disable-next-line no-restricted-syntax diff --git a/apps/dashboard/src/app/(app)/(stripe)/utils/billing.ts b/apps/dashboard/src/app/(app)/(stripe)/utils/billing.ts index 77546be2d06..906fc538695 100644 --- a/apps/dashboard/src/app/(app)/(stripe)/utils/billing.ts +++ b/apps/dashboard/src/app/(app)/(stripe)/utils/billing.ts @@ -1,8 +1,8 @@ import "server-only"; +import { getAuthToken } from "@/api/auth-token"; import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; -import type { ProductSKU } from "@/lib/billing"; -import { getAbsoluteUrl } from "../../../../lib/vercel-utils"; -import { getAuthToken } from "../../api/lib/getAuthToken"; +import type { ProductSKU } from "@/types/billing"; +import { getAbsoluteUrl } from "@/utils/vercel"; export async function getBillingCheckoutUrl(options: { teamSlug: string; diff --git a/apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx b/apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx index 10b69c776f8..2f38d1a4664 100644 --- a/apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx +++ b/apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx @@ -1,8 +1,5 @@ "use client"; -import { CustomConnectWallet } from "@3rdweb-sdk/react/components/connect-wallet"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; -import { LazyCreateProjectDialog } from "components/settings/ApiKeys/Create/LazyCreateAPIKeyDialog"; import { useCallback, useState } from "react"; import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; @@ -11,6 +8,9 @@ import { createTeam } from "@/actions/createTeam"; import { resetAnalytics } from "@/analytics/reset"; import type { Project } from "@/api/projects"; import type { Team } from "@/api/team"; +import { CustomConnectWallet } from "@/components/connect-wallet"; +import { LazyCreateProjectDialog } from "@/components/project/create-project-modal/LazyCreateAPIKeyDialog"; +import type { Account } from "@/hooks/useApi"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import { doLogout } from "../../login/auth-actions"; import { diff --git a/apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.stories.tsx b/apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.stories.tsx index 115727eecac..e3174abd8b9 100644 --- a/apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.stories.tsx +++ b/apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.stories.tsx @@ -1,12 +1,12 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { teamsAndProjectsStub } from "stories/stubs"; +import { ThirdwebProvider } from "thirdweb/react"; +import { Button } from "@/components/ui/button"; +import { teamsAndProjectsStub } from "@/storybook/stubs"; import { BadgeContainer, mobileViewport, storybookThirdwebClient, -} from "stories/utils"; -import { ThirdwebProvider } from "thirdweb/react"; -import { Button } from "@/components/ui/button"; +} from "@/storybook/utils"; import { AccountHeaderDesktopUI, AccountHeaderMobileUI, diff --git a/apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx b/apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx index 0ac43981db2..c0158fbf97c 100644 --- a/apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx +++ b/apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx @@ -1,11 +1,11 @@ -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import Link from "next/link"; import type { ThirdwebClient } from "thirdweb"; import type { Project } from "@/api/projects"; import type { Team } from "@/api/team"; -import { GradientAvatar } from "@/components/blocks/Avatars/GradientAvatar"; +import { GradientAvatar } from "@/components/blocks/avatar/gradient-avatar"; +import { NotificationsButton } from "@/components/notifications/notification-button"; +import type { Account } from "@/hooks/useApi"; import { cn } from "@/lib/utils"; -import { NotificationsButton } from "../../../../@/components/blocks/notifications/notification-button"; import { SecondaryNav } from "../../components/Header/SecondaryNav/SecondaryNav"; import { MobileBurgerMenuButton } from "../../components/MobileBurgerMenuButton"; import { ThirdwebMiniLogo } from "../../components/ThirdwebMiniLogo"; diff --git a/apps/dashboard/src/app/(app)/account/contracts/DeployedContractsPageHeader.tsx b/apps/dashboard/src/app/(app)/account/contracts/DeployedContractsPageHeader.tsx index d5cc4efeaee..56156880ec1 100644 --- a/apps/dashboard/src/app/(app)/account/contracts/DeployedContractsPageHeader.tsx +++ b/apps/dashboard/src/app/(app)/account/contracts/DeployedContractsPageHeader.tsx @@ -1,10 +1,10 @@ "use client"; -import { ImportModal } from "components/contract-components/import-contract/modal"; import { DownloadIcon, PlusIcon } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; import type { ThirdwebClient } from "thirdweb"; +import { ImportModal } from "@/components/contracts/import-contract/modal"; import { Button } from "@/components/ui/button"; export function DeployedContractsPageHeader(props: { diff --git a/apps/dashboard/src/app/(app)/account/contracts/_components/DeployViaCLIOrImportCard.tsx b/apps/dashboard/src/app/(app)/account/contracts/_components/DeployViaCLIOrImportCard.tsx index c24a591556d..a44b7c99b32 100644 --- a/apps/dashboard/src/app/(app)/account/contracts/_components/DeployViaCLIOrImportCard.tsx +++ b/apps/dashboard/src/app/(app)/account/contracts/_components/DeployViaCLIOrImportCard.tsx @@ -1,10 +1,10 @@ "use client"; -import { ImportModal } from "components/contract-components/import-contract/modal"; import { ArrowUpRightIcon, DownloadIcon } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; import type { ThirdwebClient } from "thirdweb"; +import { ImportModal } from "@/components/contracts/import-contract/modal"; import { Button } from "@/components/ui/button"; export function DeployViaCLIOrImportCard(props: { diff --git a/apps/dashboard/src/app/(app)/account/contracts/_components/DeployedContractsPage.tsx b/apps/dashboard/src/app/(app)/account/contracts/_components/DeployedContractsPage.tsx index 1e472892ad9..9134900dcac 100644 --- a/apps/dashboard/src/app/(app)/account/contracts/_components/DeployedContractsPage.tsx +++ b/apps/dashboard/src/app/(app)/account/contracts/_components/DeployedContractsPage.tsx @@ -1,7 +1,7 @@ -import { ContractTable } from "components/contract-components/tables/contract-table"; import { Suspense } from "react"; import type { ThirdwebClient } from "thirdweb"; import { ClientOnly } from "@/components/blocks/client-only"; +import { ContractTable } from "@/components/contract-components/tables/contract-table"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { DeployViaCLIOrImportCard } from "./DeployViaCLIOrImportCard"; import { getSortedDeployedContracts } from "./getSortedDeployedContracts"; diff --git a/apps/dashboard/src/app/(app)/account/contracts/_components/getSortedDeployedContracts.tsx b/apps/dashboard/src/app/(app)/account/contracts/_components/getSortedDeployedContracts.tsx index b7d5d45ce1a..02ef5aee09d 100644 --- a/apps/dashboard/src/app/(app)/account/contracts/_components/getSortedDeployedContracts.tsx +++ b/apps/dashboard/src/app/(app)/account/contracts/_components/getSortedDeployedContracts.tsx @@ -1,8 +1,8 @@ -import { fetchChainWithLocalOverrides } from "../../../../../utils/fetchChainWithLocalOverrides"; import { getProjectContracts, type ProjectContract, -} from "./getProjectContracts"; +} from "../../../../../@/api/getProjectContracts"; +import { fetchChainWithLocalOverrides } from "../../../../../@/utils/fetchChainWithLocalOverrides"; export async function getSortedDeployedContracts(params: { onlyMainnet?: boolean; diff --git a/apps/dashboard/src/app/(app)/account/devices/AccountDevicesPage.tsx b/apps/dashboard/src/app/(app)/account/devices/AccountDevicesPage.tsx index 75e2902d825..47d0fe7ca99 100644 --- a/apps/dashboard/src/app/(app)/account/devices/AccountDevicesPage.tsx +++ b/apps/dashboard/src/app/(app)/account/devices/AccountDevicesPage.tsx @@ -1,7 +1,7 @@ "use client"; -import { useAuthorizedWallets } from "@3rdweb-sdk/react/hooks/useApi"; -import { AuthorizedWalletsTable } from "components/settings/AuthorizedWallets/AuthorizedWalletsTable"; +import { AuthorizedWalletsTable } from "@app/account/devices/AuthorizedWalletsTable"; +import { useAuthorizedWallets } from "@/hooks/useApi"; // TODO - fetch the authorized wallets server side diff --git a/apps/dashboard/src/components/settings/AuthorizedWallets/AuthorizedWalletRevokeModal.tsx b/apps/dashboard/src/app/(app)/account/devices/AuthorizedWalletRevokeModal.tsx similarity index 100% rename from apps/dashboard/src/components/settings/AuthorizedWallets/AuthorizedWalletRevokeModal.tsx rename to apps/dashboard/src/app/(app)/account/devices/AuthorizedWalletRevokeModal.tsx diff --git a/apps/dashboard/src/components/settings/AuthorizedWallets/AuthorizedWalletsTable.tsx b/apps/dashboard/src/app/(app)/account/devices/AuthorizedWalletsTable.tsx similarity index 93% rename from apps/dashboard/src/components/settings/AuthorizedWallets/AuthorizedWalletsTable.tsx rename to apps/dashboard/src/app/(app)/account/devices/AuthorizedWalletsTable.tsx index d97e77f995b..6f854abb7c5 100644 --- a/apps/dashboard/src/components/settings/AuthorizedWallets/AuthorizedWalletsTable.tsx +++ b/apps/dashboard/src/app/(app)/account/devices/AuthorizedWalletsTable.tsx @@ -1,18 +1,18 @@ "use client"; -import { - type AuthorizedWallet, - useRevokeAuthorizedWallet, -} from "@3rdweb-sdk/react/hooks/useApi"; import { createColumnHelper } from "@tanstack/react-table"; -import { TWTable } from "components/shared/TWTable"; import { format } from "date-fns"; import { useState } from "react"; import { toast } from "sonner"; import { isAddress } from "thirdweb/utils"; -import type { ComponentWithChildren } from "types/component-with-children"; -import { shortenString } from "utils/usedapp-external"; +import { TWTable } from "@/components/blocks/TWTable"; import { Button } from "@/components/ui/button"; +import { + type AuthorizedWallet, + useRevokeAuthorizedWallet, +} from "@/hooks/useApi"; +import type { ComponentWithChildren } from "@/types/component-with-children"; +import { shortenString } from "@/utils/usedapp-external"; import { AuthorizedWalletRevokeModal } from "./AuthorizedWalletRevokeModal"; interface AuthorizedWalletsTableProps { diff --git a/apps/dashboard/src/app/(app)/account/layout.tsx b/apps/dashboard/src/app/(app)/account/layout.tsx index fff3ec2990f..4c33823b9d7 100644 --- a/apps/dashboard/src/app/(app)/account/layout.tsx +++ b/apps/dashboard/src/app/(app)/account/layout.tsx @@ -1,16 +1,16 @@ -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 { getProjects } from "@/api/projects"; import { getTeams, type Team } from "@/api/team"; -import { AppFooter } from "@/components/blocks/app-footer"; +import { AppFooter } from "@/components/footers/app-footer"; +import { AnnouncementBanner } from "@/components/misc/AnnouncementBanner"; import { TabPathLinks } from "@/components/ui/tabs"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import type { Account } from "@/hooks/useApi"; import { getAuthToken, getAuthTokenWalletAddress, -} from "../api/lib/getAuthToken"; +} from "../../../@/api/auth-token"; import { TWAutoConnect } from "../components/autoconnect"; import { loginRedirect } from "../login/loginRedirect"; import { AccountHeader } from "./components/AccountHeader"; diff --git a/apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.stories.tsx b/apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.stories.tsx index 200ab9677bf..2f66a58b42d 100644 --- a/apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.stories.tsx +++ b/apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.stories.tsx @@ -1,10 +1,10 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { teamStub } from "stories/stubs"; +import { teamStub } from "@/storybook/stubs"; import { BadgeContainer, mobileViewport, storybookThirdwebClient, -} from "stories/utils"; +} from "@/storybook/utils"; import { AccountTeamsUI } from "./AccountTeamsUI"; const meta = { diff --git a/apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.tsx b/apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.tsx index 4da989e8890..cd0a14e3318 100644 --- a/apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.tsx +++ b/apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.tsx @@ -8,7 +8,8 @@ import type { ThirdwebClient } from "thirdweb"; import { createTeam } from "@/actions/createTeam"; import type { Team } from "@/api/team"; import type { TeamAccountRole } from "@/api/team-members"; -import { GradientAvatar } from "@/components/blocks/Avatars/GradientAvatar"; +import { GradientAvatar } from "@/components/blocks/avatar/gradient-avatar"; +import { TeamPlanBadge } from "@/components/blocks/TeamPlanBadge"; import { Button } from "@/components/ui/button"; import { DropdownMenu, @@ -17,8 +18,7 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { TeamPlanBadge } from "../../components/TeamPlanBadge"; -import { getValidTeamPlan } from "../../team/components/TeamHeader/getValidTeamPlan"; +import { getValidTeamPlan } from "@/utils/getValidTeamPlan"; import { SearchInput } from "../components/SearchInput"; export function AccountTeamsUI(props: { diff --git a/apps/dashboard/src/app/(app)/account/page.tsx b/apps/dashboard/src/app/(app)/account/page.tsx index 29f0fe814ea..e5b9ceec16e 100644 --- a/apps/dashboard/src/app/(app)/account/page.tsx +++ b/apps/dashboard/src/app/(app)/account/page.tsx @@ -2,7 +2,7 @@ import { notFound } from "next/navigation"; import { getTeams } from "@/api/team"; import { getMemberByAccountId } from "@/api/team-members"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getAuthToken } from "../api/lib/getAuthToken"; +import { getAuthToken } from "../../../@/api/auth-token"; import { loginRedirect } from "../login/loginRedirect"; import { AccountTeamsUI } from "./overview/AccountTeamsUI"; import { getValidAccount } from "./settings/getAccount"; diff --git a/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPage.tsx b/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPage.tsx index 5e42e11a3ae..7b17d482d73 100644 --- a/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPage.tsx +++ b/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPage.tsx @@ -1,5 +1,4 @@ "use client"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import type { ThirdwebClient } from "thirdweb"; import { useActiveWallet, useDisconnect } from "thirdweb/react"; import { upload } from "thirdweb/storage"; @@ -7,6 +6,7 @@ import { confirmEmailWithOTP } from "@/actions/confirmEmail"; import { apiServerProxy } from "@/actions/proxies"; import { updateAccount } from "@/actions/updateAccount"; import { resetAnalytics } from "@/analytics/reset"; +import type { Account } from "@/hooks/useApi"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import { doLogout } from "../../login/auth-actions"; import { AccountSettingsPageUI } from "./AccountSettingsPageUI"; diff --git a/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPageUI.stories.tsx b/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPageUI.stories.tsx index 80e538ccdcb..695069efba1 100644 --- a/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPageUI.stories.tsx +++ b/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPageUI.stories.tsx @@ -1,6 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useState } from "react"; -import { mobileViewport, storybookThirdwebClient } from "stories/utils"; import { Checkbox, CheckboxWithLabel } from "@/components/ui/checkbox"; import { Label } from "@/components/ui/label"; import { @@ -10,6 +9,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { mobileViewport, storybookThirdwebClient } from "@/storybook/utils"; import { AccountSettingsPageUI } from "./AccountSettingsPageUI"; const meta = { diff --git a/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPageUI.tsx b/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPageUI.tsx index 10b9b1e605e..395dcd53a63 100644 --- a/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPageUI.tsx +++ b/apps/dashboard/src/app/(app)/account/settings/AccountSettingsPageUI.tsx @@ -1,9 +1,7 @@ "use client"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; -import { FileInput } from "components/shared/FileInput"; import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp"; import { CircleXIcon, EllipsisIcon, ExternalLinkIcon } from "lucide-react"; import Link from "next/link"; @@ -12,8 +10,9 @@ import { useForm } from "react-hook-form"; import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; import { z } from "zod"; -import { BillingPortalButton } from "@/components/billing"; +import { BillingPortalButton } from "@/components/billing/billing"; import { DangerSettingCard } from "@/components/blocks/DangerSettingCard"; +import { FileInput } from "@/components/blocks/FileInput"; import { SettingsCard } from "@/components/blocks/SettingsCard"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Badge } from "@/components/ui/badge"; @@ -43,8 +42,9 @@ import { InputOTPSlot, } from "@/components/ui/input-otp"; import { Spinner } from "@/components/ui/Spinner/Spinner"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import type { Account } from "@/hooks/useApi"; import { cn } from "@/lib/utils"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; type MinimalAccount = Pick< Account, diff --git a/apps/dashboard/src/app/(app)/account/settings/getAccount.ts b/apps/dashboard/src/app/(app)/account/settings/getAccount.ts index 86334e8b390..13677730e92 100644 --- a/apps/dashboard/src/app/(app)/account/settings/getAccount.ts +++ b/apps/dashboard/src/app/(app)/account/settings/getAccount.ts @@ -1,6 +1,6 @@ -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; -import { getAuthToken } from "../../api/lib/getAuthToken"; +import type { Account } from "@/hooks/useApi"; +import { getAuthToken } from "../../../../@/api/auth-token"; import { loginRedirect } from "../../login/loginRedirect"; import { isAccountOnboardingComplete } from "../../login/onboarding/isOnboardingRequired"; diff --git a/apps/dashboard/src/app/(app)/account/settings/page.tsx b/apps/dashboard/src/app/(app)/account/settings/page.tsx index cabdbce105d..1c21c933acf 100644 --- a/apps/dashboard/src/app/(app)/account/settings/page.tsx +++ b/apps/dashboard/src/app/(app)/account/settings/page.tsx @@ -1,6 +1,6 @@ import { getDefaultTeam } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getAuthToken } from "../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../@/api/auth-token"; import { loginRedirect } from "../../login/loginRedirect"; import { AccountSettingsPage } from "./AccountSettingsPage"; import { getValidAccount } from "./getAccount"; diff --git a/apps/dashboard/src/app/(app)/account/wallets/LinkWalletsUI.stories.tsx b/apps/dashboard/src/app/(app)/account/wallets/LinkWalletsUI.stories.tsx index bbea4864ec2..146a7237510 100644 --- a/apps/dashboard/src/app/(app)/account/wallets/LinkWalletsUI.stories.tsx +++ b/apps/dashboard/src/app/(app)/account/wallets/LinkWalletsUI.stories.tsx @@ -1,11 +1,11 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; +import { ThirdwebProvider } from "thirdweb/react"; +import type { LinkedWallet } from "@/api/linked-wallets"; import { BadgeContainer, mobileViewport, storybookThirdwebClient, -} from "stories/utils"; -import { ThirdwebProvider } from "thirdweb/react"; -import type { LinkedWallet } from "@/api/linked-wallets"; +} from "@/storybook/utils"; import { LinkWalletUI } from "./LinkWalletUI"; const meta = { diff --git a/apps/dashboard/src/app/(app)/account/wallets/page.tsx b/apps/dashboard/src/app/(app)/account/wallets/page.tsx index 478d80611ac..7a4e69b19bf 100644 --- a/apps/dashboard/src/app/(app)/account/wallets/page.tsx +++ b/apps/dashboard/src/app/(app)/account/wallets/page.tsx @@ -1,6 +1,6 @@ import { getLinkedWallets } from "@/api/linked-wallets"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getAuthToken } from "../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../@/api/auth-token"; import { loginRedirect } from "../../login/loginRedirect"; import { getValidAccount } from "../settings/getAccount"; import { LinkWallet } from "./LinkWalletUI"; diff --git a/apps/dashboard/src/app/(app)/api/testnet-faucet/can-claim/route.ts b/apps/dashboard/src/app/(app)/api/testnet-faucet/can-claim/route.ts index e2bbbaec411..e9722371987 100644 --- a/apps/dashboard/src/app/(app)/api/testnet-faucet/can-claim/route.ts +++ b/apps/dashboard/src/app/(app)/api/testnet-faucet/can-claim/route.ts @@ -1,5 +1,4 @@ import { ipAddress } from "@vercel/functions"; -import { cacheTtl } from "lib/redis"; import type { NextRequest } from "next/server"; import { NextResponse } from "next/server"; import { getTeams } from "@/api/team"; @@ -9,6 +8,7 @@ import { THIRDWEB_ACCESS_TOKEN, THIRDWEB_ENGINE_URL, } from "@/constants/server-envs"; +import { cacheTtl } from "@/lib/redis"; import type { CanClaimResponseType } from "./CanClaimResponseType"; // Note: This handler cannot use "edge" runtime because of Redis usage. diff --git a/apps/dashboard/src/app/(app)/api/testnet-faucet/claim/route.ts b/apps/dashboard/src/app/(app)/api/testnet-faucet/claim/route.ts index 078d8fb2a39..2fcbb42368f 100644 --- a/apps/dashboard/src/app/(app)/api/testnet-faucet/claim/route.ts +++ b/apps/dashboard/src/app/(app)/api/testnet-faucet/claim/route.ts @@ -1,7 +1,5 @@ -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { ipAddress } from "@vercel/functions"; import { startOfToday } from "date-fns"; -import { cacheGet, cacheSet } from "lib/redis"; import { type NextRequest, NextResponse } from "next/server"; import { getAddress, ZERO_ADDRESS } from "thirdweb"; import { getTeams } from "@/api/team"; @@ -15,6 +13,8 @@ import { THIRDWEB_ENGINE_URL, TURNSTILE_SECRET_KEY, } from "@/constants/server-envs"; +import type { Account } from "@/hooks/useApi"; +import { cacheGet, cacheSet } from "@/lib/redis"; import { getFaucetClaimAmount } from "./claim-amount"; interface RequestTestnetFundsPayload { diff --git a/apps/dashboard/src/app/(app)/components/Header/SecondaryNav/SecondaryNav.tsx b/apps/dashboard/src/app/(app)/components/Header/SecondaryNav/SecondaryNav.tsx index e31e7b93063..3f505aa1602 100644 --- a/apps/dashboard/src/app/(app)/components/Header/SecondaryNav/SecondaryNav.tsx +++ b/apps/dashboard/src/app/(app)/components/Header/SecondaryNav/SecondaryNav.tsx @@ -1,8 +1,8 @@ -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import Link from "next/link"; import type React from "react"; import type { ThirdwebClient } from "thirdweb"; -import { NotificationsButton } from "../../../../../@/components/blocks/notifications/notification-button"; +import { NotificationsButton } from "@/components/notifications/notification-button"; +import type { Account } from "@/hooks/useApi"; import { AccountButton } from "./account-button.client"; import { ResourcesDropdownButton } from "./ResourcesDropdownButton"; diff --git a/apps/dashboard/src/app/(app)/components/Header/SecondaryNav/account-button.client.tsx b/apps/dashboard/src/app/(app)/components/Header/SecondaryNav/account-button.client.tsx index 695d36cd575..6ad7948fcc8 100644 --- a/apps/dashboard/src/app/(app)/components/Header/SecondaryNav/account-button.client.tsx +++ b/apps/dashboard/src/app/(app)/components/Header/SecondaryNav/account-button.client.tsx @@ -1,19 +1,19 @@ "use client"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; -import { useEns } from "components/contract-components/hooks"; import { LogOutIcon, MoonIcon, SunIcon } from "lucide-react"; import Link from "next/link"; import { useTheme } from "next-themes"; import { useState } from "react"; import type { ThirdwebClient } from "thirdweb"; -import { GradientAvatar } from "@/components/blocks/Avatars/GradientAvatar"; +import { GradientAvatar } from "@/components/blocks/avatar/gradient-avatar"; import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; +import { useEns } from "@/hooks/contract-hooks"; +import type { Account } from "@/hooks/useApi"; import { cn } from "@/lib/utils"; export function AccountButton(props: { diff --git a/apps/dashboard/src/app/(app)/components/MobileBurgerMenuButton.tsx b/apps/dashboard/src/app/(app)/components/MobileBurgerMenuButton.tsx index 9e2942ba2b5..f1a2b1675f8 100644 --- a/apps/dashboard/src/app/(app)/components/MobileBurgerMenuButton.tsx +++ b/apps/dashboard/src/app/(app)/components/MobileBurgerMenuButton.tsx @@ -1,6 +1,5 @@ "use client"; -import { useEns } from "components/contract-components/hooks"; import { LogOutIcon, MenuIcon, @@ -17,6 +16,7 @@ import type { ThirdwebClient } from "thirdweb"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; import { SkeletonContainer } from "@/components/ui/skeleton"; +import { useEns } from "@/hooks/contract-hooks"; import { cn } from "@/lib/utils"; import { ThirdwebMiniLogo } from "./ThirdwebMiniLogo"; diff --git a/apps/dashboard/src/app/(app)/drops/[slug]/layout.tsx b/apps/dashboard/src/app/(app)/drops/[slug]/layout.tsx index 15e438a8790..3904e0f50af 100644 --- a/apps/dashboard/src/app/(app)/drops/[slug]/layout.tsx +++ b/apps/dashboard/src/app/(app)/drops/[slug]/layout.tsx @@ -1,5 +1,5 @@ -import { ErrorProvider } from "contexts/error-handler"; -import { AppFooter } from "@/components/blocks/app-footer"; +import { AppFooter } from "@/components/footers/app-footer"; +import { ErrorProvider } from "@/contexts/error-handler"; export default function DashboardLayout(props: { children: React.ReactNode }) { return ( diff --git a/apps/dashboard/src/app/(app)/drops/[slug]/mint-ui.tsx b/apps/dashboard/src/app/(app)/drops/[slug]/mint-ui.tsx index ecb47264644..17fdd9b91cc 100644 --- a/apps/dashboard/src/app/(app)/drops/[slug]/mint-ui.tsx +++ b/apps/dashboard/src/app/(app)/drops/[slug]/mint-ui.tsx @@ -1,7 +1,5 @@ "use client"; -import { CustomConnectWallet } from "@3rdweb-sdk/react/components/connect-wallet"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { MinusIcon, PlusIcon } from "lucide-react"; import type React from "react"; import { useId, useState } from "react"; @@ -14,12 +12,14 @@ import { useActiveAccount, useReadContract, } from "thirdweb/react"; +import { CustomConnectWallet } from "@/components/connect-wallet"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardFooter } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Switch } from "@/components/ui/switch"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; type Props = { contract: ThirdwebContract; 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 0e39744bb4b..5da2e639ba0 100644 --- a/apps/dashboard/src/app/(app)/drops/[slug]/opengraph-image.tsx +++ b/apps/dashboard/src/app/(app)/drops/[slug]/opengraph-image.tsx @@ -1,8 +1,8 @@ import { ImageResponse } from "next/og"; import { useId } from "react"; import { download } from "thirdweb/storage"; -import { fetchChain } from "utils/fetchChain"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; +import { fetchChain } from "@/utils/fetchChain"; 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 74daabe387b..f0cbc57cc34 100644 --- a/apps/dashboard/src/app/(app)/drops/[slug]/page.tsx +++ b/apps/dashboard/src/app/(app)/drops/[slug]/page.tsx @@ -1,4 +1,3 @@ -import { defineDashboardChain } from "lib/defineDashboardChain"; import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { getContract, toTokens } from "thirdweb"; @@ -13,6 +12,7 @@ import { getNFT as getNFT1155, } from "thirdweb/extensions/erc1155"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; +import { defineDashboardChain } from "@/lib/defineDashboardChain"; 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 735dbd3de06..819c33a365c 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,7 +1,7 @@ import { notFound } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getAuthToken } from "../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../@/api/auth-token"; 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 6615954f278..cb8789c1080 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 @@ -3,14 +3,14 @@ import { InfoIcon } from "lucide-react"; import { notFound } from "next/navigation"; import { getProjects } from "@/api/projects"; import { getTeamBySlug, getTeams } from "@/api/team"; -import { AppFooter } from "@/components/blocks/app-footer"; +import { AppFooter } from "@/components/footers/app-footer"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getValidAccount } from "../../../account/settings/getAccount"; import { getAuthToken, getAuthTokenWalletAddress, -} from "../../../api/lib/getAuthToken"; +} from "../../../../../@/api/auth-token"; +import { getValidAccount } from "../../../account/settings/getAccount"; import { loginRedirect } from "../../../login/loginRedirect"; import { TeamHeaderLoggedIn } from "../../../team/components/TeamHeader/team-header-logged-in.client"; 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 a51507c3d41..869aea05ac2 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,7 +1,7 @@ import { notFound } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getAuthToken } from "../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../@/api/auth-token"; import { loginRedirect } from "../../../login/loginRedirect"; import { TeamOnboardingLayout } from "../../../login/onboarding/onboarding-layout"; import { TeamInfoForm } from "../../../login/onboarding/team-onboarding/team-onboarding"; diff --git a/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/select-plan/_components/plan-selector.tsx b/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/select-plan/_components/plan-selector.tsx index 92e95d773cc..2eb11a8d2c2 100644 --- a/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/select-plan/_components/plan-selector.tsx +++ b/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/select-plan/_components/plan-selector.tsx @@ -1,7 +1,6 @@ "use client"; import Link from "next/link"; -import { pollWithTimeout } from "utils/pollWithTimeout"; import { reportOnboardingPlanSelected, reportOnboardingPlanSelectionSkipped, @@ -10,8 +9,9 @@ import type { Team } from "@/api/team"; import { PricingCard } from "@/components/blocks/pricing-card"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; +import { useStripeRedirectEvent } from "@/hooks/stripe/redirect-event"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { useStripeRedirectEvent } from "../../../../../(stripe)/stripe-redirect/stripeRedirectChannel"; +import { pollWithTimeout } from "@/utils/pollWithTimeout"; export function PlanSelector(props: { team: Team; diff --git a/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/select-plan/page.tsx b/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/select-plan/page.tsx index 35d3b82b2a0..9790451205c 100644 --- a/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/select-plan/page.tsx +++ b/apps/dashboard/src/app/(app)/get-started/team/[team_slug]/select-plan/page.tsx @@ -1,6 +1,6 @@ import { notFound } from "next/navigation"; import { getTeamBySlug, type Team } from "@/api/team"; -import { getAuthToken } from "../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../@/api/auth-token"; import { TeamOnboardingLayout } from "../../../../login/onboarding/onboarding-layout"; import { PlanSelector } from "./_components/plan-selector"; diff --git a/apps/dashboard/src/app/(app)/join/team/[team_slug]/[invite_id]/JoinTeamPage.tsx b/apps/dashboard/src/app/(app)/join/team/[team_slug]/[invite_id]/JoinTeamPage.tsx index 86e3c994064..3d042f9b84c 100644 --- a/apps/dashboard/src/app/(app)/join/team/[team_slug]/[invite_id]/JoinTeamPage.tsx +++ b/apps/dashboard/src/app/(app)/join/team/[team_slug]/[invite_id]/JoinTeamPage.tsx @@ -6,7 +6,7 @@ import Link from "next/link"; import { toast } from "sonner"; import { acceptInvite } from "@/actions/acceptInvite"; import type { Team } from "@/api/team"; -import { ToggleThemeButton } from "@/components/color-mode-toggle"; +import { ToggleThemeButton } from "@/components/blocks/color-mode-toggle"; import { DotsBackgroundPattern } from "@/components/ui/background-patterns"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/Spinner/Spinner"; diff --git a/apps/dashboard/src/app/(app)/login/LoginPage.tsx b/apps/dashboard/src/app/(app)/login/LoginPage.tsx index 09f82e9fa7a..3b7190952e9 100644 --- a/apps/dashboard/src/app/(app)/login/LoginPage.tsx +++ b/apps/dashboard/src/app/(app)/login/LoginPage.tsx @@ -1,8 +1,6 @@ "use client"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { Turnstile } from "@marsidev/react-turnstile"; -import { isVercel } from "lib/vercel-utils"; import { PhoneIcon } from "lucide-react"; import Link from "next/link"; import { useTheme } from "next-themes"; @@ -17,19 +15,21 @@ import { createWallet, inAppWallet } from "thirdweb/wallets"; import { getRawAccountAction } from "@/actions/getAccount"; import { resetAnalytics } from "@/analytics/reset"; import { ClientOnly } from "@/components/blocks/client-only"; +import { ToggleThemeButton } from "@/components/blocks/color-mode-toggle"; import { GenericLoadingPage } from "@/components/blocks/skeletons/GenericLoadingPage"; -import { ToggleThemeButton } from "@/components/color-mode-toggle"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; import { NEXT_PUBLIC_TURNSTILE_SITE_KEY } from "@/constants/public-envs"; +import type { Account } from "@/hooks/useApi"; import { useDashboardRouter } from "@/lib/DashboardRouter"; +import { isVercel } from "@/utils/vercel"; import { LAST_USED_PROJECT_ID, LAST_USED_TEAM_ID, -} from "../../../constants/cookies"; -import { deleteCookie } from "../../../lib/cookie"; -import { getSDKTheme } from "../components/sdk-component-theme"; +} from "../../../@/constants/cookies"; +import { deleteCookie } from "../../../@/utils/cookie"; +import { getSDKTheme } from "../../../@/utils/sdk-component-theme"; import { ThirdwebMiniLogo } from "../components/ThirdwebMiniLogo"; import { LAST_VISITED_TEAM_PAGE_PATH } from "../team/components/last-visited-page/consts"; import { doLogin, doLogout, getLoginPayload, isLoggedIn } from "./auth-actions"; diff --git a/apps/dashboard/src/app/(app)/login/auth-actions.ts b/apps/dashboard/src/app/(app)/login/auth-actions.ts index 6a0586af946..a43056ae0a0 100644 --- a/apps/dashboard/src/app/(app)/login/auth-actions.ts +++ b/apps/dashboard/src/app/(app)/login/auth-actions.ts @@ -1,7 +1,6 @@ "use server"; import "server-only"; -import { isVercel } from "lib/vercel-utils"; import { cookies } from "next/headers"; import { getAddress } from "thirdweb"; import type { @@ -12,6 +11,7 @@ import type { import { COOKIE_ACTIVE_ACCOUNT, COOKIE_PREFIX_TOKEN } from "@/constants/cookie"; import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; import { API_SERVER_SECRET } from "@/constants/server-envs"; +import { isVercel } from "@/utils/vercel"; import { verifyTurnstileToken } from "./verifyTurnstileToken"; export async function getLoginPayload( diff --git a/apps/dashboard/src/app/(app)/login/onboarding/LinkWalletPrompt/LinkWalletPrompt.stories.tsx b/apps/dashboard/src/app/(app)/login/onboarding/LinkWalletPrompt/LinkWalletPrompt.stories.tsx index e7b5ef7927b..4f45238ba71 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/LinkWalletPrompt/LinkWalletPrompt.stories.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/LinkWalletPrompt/LinkWalletPrompt.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { storybookLog } from "../../../../../stories/utils"; +import { storybookLog } from "../../../../../@/storybook/utils"; import { AccountOnboardingLayout } from "../onboarding-layout"; import { LinkWalletPrompt } from "./LinkWalletPrompt"; 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 089806ec457..0ae7827b654 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/LinkWalletPrompt/LinkWalletPrompt.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/LinkWalletPrompt/LinkWalletPrompt.tsx @@ -3,10 +3,10 @@ import { useMutation } from "@tanstack/react-query"; import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react"; import { toast } from "sonner"; -import { shortenString } from "utils/usedapp-external"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; +import { shortenString } from "@/utils/usedapp-external"; export function LinkWalletPrompt(props: { email: string; diff --git a/apps/dashboard/src/app/(app)/login/onboarding/LoginOrSignup/LoginOrSignup.stories.tsx b/apps/dashboard/src/app/(app)/login/onboarding/LoginOrSignup/LoginOrSignup.stories.tsx index c78ebda858f..a0fe17fc7b9 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/LoginOrSignup/LoginOrSignup.stories.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/LoginOrSignup/LoginOrSignup.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { storybookLog } from "stories/utils"; +import { storybookLog } from "@/storybook/utils"; import { AccountOnboardingLayout } from "../onboarding-layout"; import { LoginOrSignup } from "./LoginOrSignup"; diff --git a/apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.stories.tsx b/apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.stories.tsx index b400650e2c0..c36ccb6731d 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.stories.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { newAccountStub } from "stories/stubs"; -import { storybookLog } from "stories/utils"; +import { newAccountStub } from "@/storybook/stubs"; +import { storybookLog } from "@/storybook/utils"; import { AccountOnboardingLayout } from "../onboarding-layout"; import { VerifyEmail } from "./VerifyEmail"; diff --git a/apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.tsx b/apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.tsx index 5dee09d77fd..0299cca92d7 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.tsx @@ -1,5 +1,4 @@ "use client"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp"; @@ -13,6 +12,7 @@ import { InputOTPSlot, } from "@/components/ui/input-otp"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import type { Account } from "@/hooks/useApi"; import { cn } from "@/lib/utils"; import { type EmailConfirmationValidationSchema, diff --git a/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding-ui.tsx b/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding-ui.tsx index 63246eee360..426e04c2be6 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding-ui.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding-ui.tsx @@ -1,7 +1,7 @@ "use client"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { useState } from "react"; +import type { Account } from "@/hooks/useApi"; import { LinkWalletPrompt } from "./LinkWalletPrompt/LinkWalletPrompt"; import { LoginOrSignup } from "./LoginOrSignup/LoginOrSignup"; import { AccountOnboardingLayout } from "./onboarding-layout"; diff --git a/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding.stories.tsx b/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding.stories.tsx index 57482bc44e4..f227321e1f8 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding.stories.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { newAccountStub, teamStub } from "../../../../stories/stubs"; -import { storybookLog } from "../../../../stories/utils"; +import { newAccountStub, teamStub } from "../../../../@/storybook/stubs"; +import { storybookLog } from "../../../../@/storybook/utils"; import { AccountOnboardingUI } from "./account-onboarding-ui"; const meta = { 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 eae0a5bf612..53e76ea4b72 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/account-onboarding.tsx @@ -1,11 +1,11 @@ "use client"; +import { useActiveWallet, useDisconnect } from "thirdweb/react"; import { resendEmailClient, updateAccountClient, verifyEmailClient, -} from "@3rdweb-sdk/react/hooks/useApi"; -import { useActiveWallet, useDisconnect } from "thirdweb/react"; +} from "@/hooks/useApi"; import { doLogout } from "../auth-actions"; import { AccountOnboardingUI } from "./account-onboarding-ui"; diff --git a/apps/dashboard/src/app/(app)/login/onboarding/isOnboardingRequired.ts b/apps/dashboard/src/app/(app)/login/onboarding/isOnboardingRequired.ts index c3f800fed07..08ec72658dd 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/isOnboardingRequired.ts +++ b/apps/dashboard/src/app/(app)/login/onboarding/isOnboardingRequired.ts @@ -1,4 +1,4 @@ -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; +import type { Account } from "@/hooks/useApi"; export function isAccountOnboardingComplete(account: Account) { // if email is confirmed, onboarding is considered complete diff --git a/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.stories.tsx b/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.stories.tsx index ae9b095162f..47b7671f4ff 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.stories.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.stories.tsx @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { teamStub } from "stories/stubs"; -import { storybookLog, storybookThirdwebClient } from "stories/utils"; import type { Team } from "@/api/team"; +import { teamStub } from "@/storybook/stubs"; +import { storybookLog, storybookThirdwebClient } from "@/storybook/utils"; import { TeamOnboardingLayout } from "../onboarding-layout"; import { InviteTeamMembersUI } from "./InviteTeamMembers"; diff --git a/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.tsx b/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.tsx index 48bb2591161..76af32a734b 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.tsx @@ -3,7 +3,6 @@ import { ArrowRightIcon, CircleArrowUpIcon } from "lucide-react"; import { useState, useTransition } from "react"; import type { ThirdwebClient } from "thirdweb"; -import { pollWithTimeout } from "utils/pollWithTimeout"; import { reportOnboardingMembersInvited, reportOnboardingMembersSkipped, @@ -23,8 +22,9 @@ import { } from "@/components/ui/sheet"; import { TabButtons } from "@/components/ui/tabs"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; +import { useStripeRedirectEvent } from "@/hooks/stripe/redirect-event"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { useStripeRedirectEvent } from "../../../(stripe)/stripe-redirect/stripeRedirectChannel"; +import { pollWithTimeout } from "@/utils/pollWithTimeout"; import { InviteSection, type InviteTeamMembersFn, diff --git a/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/TeamInfoForm.stories.tsx b/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/TeamInfoForm.stories.tsx index a800483f6df..de73d8df2be 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/TeamInfoForm.stories.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/TeamInfoForm.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { teamStub } from "stories/stubs"; -import { storybookLog, storybookThirdwebClient } from "stories/utils"; +import { teamStub } from "@/storybook/stubs"; +import { storybookLog, storybookThirdwebClient } from "@/storybook/utils"; import { TeamOnboardingLayout } from "../onboarding-layout"; import { TeamInfoFormUI } from "./TeamInfoForm"; diff --git a/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/TeamInfoForm.tsx b/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/TeamInfoForm.tsx index 26bb46253b1..c07c0b478e3 100644 --- a/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/TeamInfoForm.tsx +++ b/apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/TeamInfoForm.tsx @@ -1,6 +1,5 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation, useQuery } from "@tanstack/react-query"; -import { FileInput } from "components/shared/FileInput"; import { ArrowRightIcon } from "lucide-react"; import { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; @@ -9,6 +8,7 @@ import type { ThirdwebClient } from "thirdweb"; import { useDebounce } from "use-debounce"; import { z } from "zod"; import type { Team } from "@/api/team"; +import { FileInput } from "@/components/blocks/FileInput"; import { Button } from "@/components/ui/button"; import { Form, diff --git a/apps/dashboard/src/app/(app)/not-found.tsx b/apps/dashboard/src/app/(app)/not-found.tsx index 1c36fd31475..33dbe2b45af 100644 --- a/apps/dashboard/src/app/(app)/not-found.tsx +++ b/apps/dashboard/src/app/(app)/not-found.tsx @@ -1,5 +1,73 @@ -import { NotFoundPage } from "components/not-found-page"; +import Link from "next/link"; export default function NotFound() { - return ; + return ( +
+
+
+
+ 404 +
+ +
+ +

+ Uh oh. + Looks like you're lost! +

+ +
+ +
+

+ Find live content on our{" "} + + homepage + + ,{" "} + + dashboard + {" "} + or{" "} + + developer portal + + . +

+
+ + +
+
+
+ ); } + +type AuroraProps = { + size: { width: string; height: string }; + pos: { top: string; left: string }; + color: string; +}; + +const Aurora: React.FC = ({ color, pos, size }) => { + return ( +
+ ); +}; 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 c835b68a528..f51d07d2d49 100644 --- a/apps/dashboard/src/app/(app)/project-showcase/[slug]/page.tsx +++ b/apps/dashboard/src/app/(app)/project-showcase/[slug]/page.tsx @@ -1,4 +1,3 @@ -import { PROJECT_SHOWCASE_DATA } from "lib/project-showcase-constants"; import { ExternalLinkIcon, FileTextIcon } from "lucide-react"; import Link from "next/link"; import { Badge } from "@/components/ui/badge"; @@ -11,7 +10,8 @@ import { 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 { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; 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 8a6e8d6ec7f..e7a31432330 100644 --- a/apps/dashboard/src/app/(app)/project-showcase/page.tsx +++ b/apps/dashboard/src/app/(app)/project-showcase/page.tsx @@ -1,9 +1,3 @@ -import { - PROJECT_SHOWCASE_DATA, - PROJECT_SHOWCASE_INDUSTRIES, - PROJECT_SHOWCASE_ITEMS_PER_PAGE, -} from "lib/project-showcase-constants"; -import { getAbsoluteUrl } from "lib/vercel-utils"; import { FileTextIcon } from "lucide-react"; import type { Metadata } from "next"; import Image from "next/image"; @@ -26,7 +20,13 @@ import { PaginationPrevious, } from "@/components/ui/pagination"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { + PROJECT_SHOWCASE_DATA, + PROJECT_SHOWCASE_INDUSTRIES, + PROJECT_SHOWCASE_ITEMS_PER_PAGE, +} from "@/lib/project-showcase-constants"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; +import { getAbsoluteUrl } from "@/utils/vercel"; export const metadata: Metadata = { description: "Discover the latest web3 apps and games built on thirdweb", diff --git a/apps/dashboard/src/app/(app)/providers.tsx b/apps/dashboard/src/app/(app)/providers.tsx index e39a4c4973b..1de631d1068 100644 --- a/apps/dashboard/src/app/(app)/providers.tsx +++ b/apps/dashboard/src/app/(app)/providers.tsx @@ -1,20 +1,20 @@ "use client"; -import { CustomConnectWallet } from "@3rdweb-sdk/react/components/connect-wallet"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { isSanctionedAddress } from "data/eth-sanctioned-addresses"; -import { useAllChainsData } from "hooks/chains/allChains"; import { ThemeProvider, useTheme } from "next-themes"; import { NuqsAdapter } from "nuqs/adapters/next/app"; import { useEffect, useMemo } from "react"; import { Toaster } from "sonner"; -import { SyncChainStores } from "stores/chainStores"; import { ThirdwebProvider, useActiveAccount, useConnectionManager, } from "thirdweb/react"; +import { CustomConnectWallet } from "@/components/connect-wallet"; +import { isSanctionedAddress } from "@/constants/eth-sanctioned-addresses"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { SyncChainStores } from "@/stores/chainStores"; import { TWAutoConnect } from "./components/autoconnect"; const queryClient = new QueryClient(); diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/BillingAlertBannersUI.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/BillingAlertBannersUI.tsx index be38422f43f..207f36aa261 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/BillingAlertBannersUI.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/BillingAlertBannersUI.tsx @@ -4,9 +4,9 @@ import Link from "next/link"; import { useTransition } from "react"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { useStripeRedirectEvent } from "@/hooks/stripe/redirect-event"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import { cn } from "@/lib/utils"; -import { useStripeRedirectEvent } from "../../../../(stripe)/stripe-redirect/stripeRedirectChannel"; function BillingAlertBanner(props: { title: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/TotalSponsoredCard.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/TotalSponsoredCard.tsx index 6d84342df41..e994c0a5465 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/TotalSponsoredCard.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/TotalSponsoredCard.tsx @@ -1,10 +1,10 @@ -import { EmptyAccountAbstractionChartContent } from "components/smart-wallets/AccountAbstractionAnalytics/SponsoredTransactionsChartCard"; import { defineChain } from "thirdweb"; import { type ChainMetadata, getChainMetadata } from "thirdweb/chains"; -import type { UserOpStats } from "types/analytics"; import { cn } from "@/lib/utils"; +import type { UserOpStats } from "@/types/analytics"; import { BarChart } from "../../../components/Analytics/BarChart"; import { CombinedBarChartCard } from "../../../components/Analytics/CombinedBarChartCard"; +import { EmptyAccountAbstractionChartContent } from "../../[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/SponsoredTransactionsChartCard"; export async function TotalSponsoredChartCardUI({ data, diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/TransactionsCard.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/TransactionsCard.tsx index 46fa303b914..24698ade816 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/TransactionsCard.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/TransactionsCard.tsx @@ -1,10 +1,10 @@ -import { EmptyAccountAbstractionChartContent } from "components/smart-wallets/AccountAbstractionAnalytics/SponsoredTransactionsChartCard"; import { defineChain } from "thirdweb"; import { type ChainMetadata, getChainMetadata } from "thirdweb/chains"; -import type { TransactionStats } from "types/analytics"; import { cn } from "@/lib/utils"; +import type { TransactionStats } from "@/types/analytics"; import { BarChart } from "../../../components/Analytics/BarChart"; import { CombinedBarChartCard } from "../../../components/Analytics/CombinedBarChartCard"; +import { EmptyAccountAbstractionChartContent } from "../../[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/SponsoredTransactionsChartCard"; export async function TransactionsChartCardUI({ data, 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 3becb1503c0..ee12a44ebe2 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 @@ -1,19 +1,16 @@ -import { AnnouncementBanner } from "components/notices/AnnouncementBanner"; import Link from "next/link"; import { redirect } from "next/navigation"; +import { getAuthToken, getAuthTokenWalletAddress } from "@/api/auth-token"; import { getProjects } from "@/api/projects"; import { getTeamBySlug, getTeams } from "@/api/team"; -import { AppFooter } from "@/components/blocks/app-footer"; +import { CustomChatButton } from "@/components/chat/CustomChatButton"; +import { AppFooter } from "@/components/footers/app-footer"; +import { AnnouncementBanner } from "@/components/misc/AnnouncementBanner"; import { Button } from "@/components/ui/button"; import { TabPathLinks } from "@/components/ui/tabs"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { CustomChatButton } from "../../../../../components/CustomChat/CustomChatButton"; import { siwaExamplePrompts } from "../../../(dashboard)/support/definitions"; import { getValidAccount } from "../../../account/settings/getAccount"; -import { - getAuthToken, - getAuthTokenWalletAddress, -} from "../../../api/lib/getAuthToken"; import { TeamHeaderLoggedIn } from "../../components/TeamHeader/team-header-logged-in.client"; export default async function TeamLayout(props: { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/page.tsx index 13d3bb75280..9f7b8352367 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/page.tsx @@ -5,7 +5,7 @@ import { getProjects, type Project } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; import { DismissibleAlert } from "@/components/blocks/dismissible-alert"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getAuthToken } from "../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../@/api/auth-token"; import { loginRedirect } from "../../../login/loginRedirect"; import { Changelog } from "./_components/Changelog"; import { FreePlanUpsellBannerUI } from "./_components/FreePlanUpsellBannerUI"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/analytics/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/analytics/page.tsx index 426dd8886f1..77f4e64b130 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/analytics/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/analytics/page.tsx @@ -2,21 +2,9 @@ import { EmptyStateCard, EmptyStateContent, } from "app/(app)/team/components/Analytics/EmptyStateCard"; -import { - type DurationId, - getLastNDaysRange, - type Range, -} from "components/analytics/date-range-selector"; -import { LoadingChartState } from "components/analytics/empty-chart-state"; import { redirect } from "next/navigation"; import { Suspense } from "react"; import { getWalletInfo, type WalletId } from "thirdweb/wallets"; -import type { - InAppWalletStats, - UniversalBridgeStats, - WalletStats, - WalletUserStats, -} from "types/analytics"; import { getClientTransactions, getInAppWalletUsage, @@ -25,8 +13,19 @@ import { getWalletConnections, getWalletUsers, } from "@/api/analytics"; - import { getTeamBySlug } from "@/api/team"; +import { + type DurationId, + getLastNDaysRange, + type Range, +} from "@/components/analytics/date-range-selector"; +import { LoadingChartState } from "@/components/analytics/empty-chart-state"; +import type { + InAppWalletStats, + UniversalBridgeStats, + WalletStats, + WalletUserStats, +} from "@/types/analytics"; import { AnalyticsHeader } from "../../../../components/Analytics/AnalyticsHeader"; import { CombinedBarChartCard } from "../../../../components/Analytics/CombinedBarChartCard"; import { PieChartCard } from "../../../../components/Analytics/PieChartCard"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemAnalyticsPage.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemAnalyticsPage.tsx index 98546e841eb..a9300402db8 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemAnalyticsPage.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemAnalyticsPage.tsx @@ -1,9 +1,9 @@ +import { getEcosystemWalletUsage } from "@/api/analytics"; import { getLastNDaysRange, type Range, -} from "components/analytics/date-range-selector"; -import { RangeSelector } from "components/analytics/range-selector"; -import { getEcosystemWalletUsage } from "@/api/analytics"; +} from "@/components/analytics/date-range-selector"; +import { RangeSelector } from "@/components/analytics/range-selector"; import type { Partner } from "../../../../types"; import { EcosystemWalletUsersChartCard } from "./EcosystemWalletUsersChartCard"; import { EcosystemWalletsSummary } from "./Summary"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemWalletUsersChartCard.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemWalletUsersChartCard.stories.tsx index a1bb5ebbd9e..88790acd863 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemWalletUsersChartCard.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemWalletUsersChartCard.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import type { EcosystemWalletStats } from "types/analytics"; +import type { EcosystemWalletStats } from "@/types/analytics"; import { EcosystemWalletUsersChartCard } from "./EcosystemWalletUsersChartCard"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemWalletUsersChartCard.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemWalletUsersChartCard.tsx index 91c842d6082..22f9da796c7 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemWalletUsersChartCard.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemWalletUsersChartCard.tsx @@ -1,15 +1,15 @@ "use client"; -import { ReactIcon } from "components/icons/brand-icons/ReactIcon"; -import { TypeScriptIcon } from "components/icons/brand-icons/TypeScriptIcon"; -import { UnityIcon } from "components/icons/brand-icons/UnityIcon"; -import { DocLink } from "components/shared/DocLink"; import { format } from "date-fns"; -import { formatTickerNumber } from "lib/format-utils"; import { useMemo } from "react"; -import type { EcosystemWalletStats } from "types/analytics"; import { ThirdwebBarChart } from "@/components/blocks/charts/bar-chart"; +import { DocLink } from "@/components/blocks/DocLink"; import { ExportToCSVButton } from "@/components/blocks/ExportToCSVButton"; import type { ChartConfig } from "@/components/ui/chart"; +import { ReactIcon } from "@/icons/brand-icons/ReactIcon"; +import { TypeScriptIcon } from "@/icons/brand-icons/TypeScriptIcon"; +import { UnityIcon } from "@/icons/brand-icons/UnityIcon"; +import type { EcosystemWalletStats } from "@/types/analytics"; +import { formatTickerNumber } from "@/utils/format-utils"; import type { Partner } from "../../../../types"; type ChartData = Record & { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/Summary.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/Summary.tsx index 62f8868c788..d88ba2f2bc8 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/Summary.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/Summary.tsx @@ -1,6 +1,6 @@ -import { StatCard } from "components/analytics/stat"; import { ActivityIcon, UserIcon } from "lucide-react"; -import type { EcosystemWalletStats } from "types/analytics"; +import { StatCard } from "@/components/analytics/stat"; +import type { EcosystemWalletStats } from "@/types/analytics"; export function EcosystemWalletsSummary(props: { allTimeStats: EcosystemWalletStats[] | undefined; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/page.tsx index 9e9990cbff1..80f30feac97 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/page.tsx @@ -1,6 +1,6 @@ import { redirect } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; -import { getAuthToken } from "../../../../../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../../../../../@/api/auth-token"; import { fetchEcosystem } from "../../../utils/fetchEcosystem"; import { fetchPartners } from "../configuration/hooks/fetchPartners"; import { EcosystemAnalyticsPage } from "./components/EcosystemAnalyticsPage"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/EcosystemSlugLayout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/EcosystemSlugLayout.tsx index e9cf76e40eb..01527b8904d 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/EcosystemSlugLayout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/EcosystemSlugLayout.tsx @@ -2,7 +2,7 @@ import { redirect } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; import { SidebarLayout } from "@/components/blocks/SidebarLayout"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getAuthToken } from "../../../../../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../../../../../@/api/auth-token"; import { fetchEcosystem } from "../../../utils/fetchEcosystem"; import { EcosystemHeader } from "./ecosystem-header.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/ecosystem-header.client.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/ecosystem-header.client.tsx index dcfe1d418d4..e7cd387631c 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/ecosystem-header.client.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/ecosystem-header.client.tsx @@ -1,5 +1,4 @@ "use client"; -import { useDashboardStorageUpload } from "@3rdweb-sdk/react/hooks/useDashboardStorageUpload"; import { AlertTriangleIcon, CheckIcon, @@ -38,9 +37,10 @@ import { ImageUpload } from "@/components/ui/image-upload"; import { Input } from "@/components/ui/input"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { Skeleton } from "@/components/ui/skeleton"; +import { useDashboardStorageUpload } from "@/hooks/useDashboardStorageUpload"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; import { cn } from "@/lib/utils"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; import { useEcosystemList } from "../../../hooks/use-ecosystem-list"; import type { Ecosystem } from "../../../types"; import { useUpdateEcosystem } from "../configuration/hooks/use-update-ecosystem"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/add-partner/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/add-partner/page.tsx index 656c360dbee..1ddf351c36b 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/add-partner/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/add-partner/page.tsx @@ -1,7 +1,7 @@ import { notFound } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getAuthToken } from "../../../../../../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../../../../../../@/api/auth-token"; import { loginRedirect } from "../../../../../../../../../login/loginRedirect"; import { AddPartnerForm } from "../components/client/add-partner-form.client"; import { fetchEcosystem } from "../hooks/fetchEcosystem"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/server/partners-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/server/partners-table.tsx index 1483549c0f8..e65ac9ac787 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/server/partners-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/server/partners-table.tsx @@ -1,6 +1,6 @@ +import { Link } from "chakra/link"; import { PencilIcon, Trash2Icon } from "lucide-react"; import { toast } from "sonner"; -import { Link } from "tw-components/link"; import { Button } from "@/components/ui/button"; import { ConfirmationDialog } from "@/components/ui/ConfirmationDialog"; import { CopyButton } from "@/components/ui/CopyButton"; 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 1b33c1af0ad..27d1ca9cb74 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,7 +1,7 @@ import { notFound } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getAuthToken } from "../../../../../../../../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../../../../../../../../@/api/auth-token"; import { loginRedirect } from "../../../../../../../../../../../login/loginRedirect"; import { UpdatePartnerForm } from "../../../components/client/update-partner-form.client"; import { fetchEcosystem } from "../../../hooks/fetchEcosystem"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/page.tsx index ad27d82b18e..8375e1ac9fd 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/page.tsx @@ -1,6 +1,6 @@ import { notFound } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; -import { getAuthToken } from "../../../../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../../../../@/api/auth-token"; import { loginRedirect } from "../../../../../../../login/loginRedirect"; import { EcosystemPermissionsPage } from "./configuration/components/client/EcosystemPermissionsPage"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/create/actions/create-ecosystem.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/create/actions/create-ecosystem.ts index 7309dc29516..43b4609cd86 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/create/actions/create-ecosystem.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/create/actions/create-ecosystem.ts @@ -5,7 +5,7 @@ import { upload } from "thirdweb/storage"; import { BASE_URL } from "@/constants/env-utils"; import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getAuthToken } from "../../../../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../../../../@/api/auth-token"; export async function createEcosystem(options: { teamSlug: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/page.tsx index 744311e5c44..32a392ea36e 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/page.tsx @@ -3,7 +3,7 @@ import Image from "next/image"; import Link from "next/link"; import { redirect } from "next/navigation"; import { Button } from "@/components/ui/button"; -import { getAuthToken } from "../../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../../@/api/auth-token"; import { loginRedirect } from "../../../../../login/loginRedirect"; import headerImage from "./assets/header.png"; import { fetchEcosystemList } from "./utils/fetchEcosystemList"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/projects/TeamProjectsPage.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/projects/TeamProjectsPage.tsx index 29b892f5d09..1d58d76e0a8 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/projects/TeamProjectsPage.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/projects/TeamProjectsPage.tsx @@ -1,6 +1,5 @@ "use client"; -import { LazyCreateProjectDialog } from "components/settings/ApiKeys/Create/LazyCreateAPIKeyDialog"; import { format } from "date-fns"; import { ArrowUpDownIcon, @@ -16,8 +15,9 @@ import { useMemo, useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import type { Project } from "@/api/projects"; import type { Team } from "@/api/team"; -import { ProjectAvatar } from "@/components/blocks/Avatars/ProjectAvatar"; -import { PaginationButtons } from "@/components/pagination-buttons"; +import { ProjectAvatar } from "@/components/blocks/avatar/project-avatar"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; +import { LazyCreateProjectDialog } from "@/components/project/create-project-modal/LazyCreateAPIKeyDialog"; import { Button } from "@/components/ui/button"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/SettingsLayout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/SettingsLayout.tsx index 3afce640318..bbefc964c44 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/SettingsLayout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/SettingsLayout.tsx @@ -1,10 +1,10 @@ "use client"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { usePathname } from "next/navigation"; import { useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import type { Team } from "@/api/team"; +import type { Account } from "@/hooks/useApi"; import { cn } from "@/lib/utils"; import { getTeamSettingsLinks } from "./_components/sidebar/getTeamSettingsLinks"; import { TeamSettingsSidebar } from "./_components/sidebar/TeamSettingsSidebar"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/sidebar/TeamSettingsSidebar.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/sidebar/TeamSettingsSidebar.tsx index 3639a1fd936..fd29fdb7afd 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/sidebar/TeamSettingsSidebar.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/sidebar/TeamSettingsSidebar.tsx @@ -1,7 +1,7 @@ -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import type { ThirdwebClient } from "thirdweb"; import type { Team } from "@/api/team"; import { Badge } from "@/components/ui/badge"; +import type { Account } from "@/hooks/useApi"; import { getTeamSettingsLinks } from "./getTeamSettingsLinks"; import { SidebarLink } from "./SidebarLink"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/components/PlanInfoCard.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/components/PlanInfoCard.stories.tsx index 6f451e7d125..d7839677631 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/components/PlanInfoCard.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/components/PlanInfoCard.stories.tsx @@ -1,8 +1,8 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { addDays } from "date-fns"; -import { teamStub, teamSubscriptionsStub } from "stories/stubs"; -import { BadgeContainer } from "stories/utils"; import type { Team } from "@/api/team"; +import { teamStub, teamSubscriptionsStub } from "@/storybook/stubs"; +import { BadgeContainer } from "@/storybook/utils"; import { PlanInfoCardUI } from "./PlanInfoCard"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/components/PlanInfoCard.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/components/PlanInfoCard.tsx index bb461a7eb97..da1a9ff95ea 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/components/PlanInfoCard.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/components/PlanInfoCard.tsx @@ -1,7 +1,5 @@ "use client"; -import { CancelPlanButton } from "components/settings/Account/Billing/CancelPlanModal/CancelPlanModal"; -import { BillingPricing } from "components/settings/Account/Billing/Pricing"; import { differenceInDays, format, isAfter } from "date-fns"; import { CircleAlertIcon, @@ -13,7 +11,10 @@ import Link from "next/link"; import { useState } from "react"; import type { Team } from "@/api/team"; import type { TeamSubscription } from "@/api/team-subscription"; -import { BillingPortalButton } from "@/components/billing"; +import { BillingPortalButton } from "@/components/billing/billing"; +import { CancelPlanButton } from "@/components/billing/CancelPlanModal/CancelPlanModal"; +import { BillingPricing } from "@/components/billing/Pricing"; +import { RenewSubscriptionButton } from "@/components/billing/renew-subscription/renew-subscription-button"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; @@ -25,8 +26,7 @@ import { } from "@/components/ui/sheet"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; -import { RenewSubscriptionButton } from "../../../../../../../../../components/settings/Account/Billing/renew-subscription/renew-subscription-button"; -import { getValidTeamPlan } from "../../../../../../components/TeamHeader/getValidTeamPlan"; +import { getValidTeamPlan } from "@/utils/getValidTeamPlan"; export function PlanInfoCardUI(props: { subscriptions: TeamSubscription[]; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/page.tsx index ee56b41c642..68814a6fed7 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/page.tsx @@ -1,13 +1,13 @@ import { redirect } from "next/navigation"; import { getStripeBalance } from "@/actions/stripe-actions"; +import { getAuthToken } from "@/api/auth-token"; import { getTeamBySlug, type Team } from "@/api/team"; import { getMemberByAccountId } from "@/api/team-members"; import { getTeamSubscriptions } from "@/api/team-subscription"; +import { CreditsInfoCard } from "@/components/billing/PlanCard"; +import { Coupons } from "@/components/billing/SubscriptionCoupons/Coupons"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { CreditsInfoCard } from "../../../../../../../../components/settings/Account/Billing/PlanCard"; -import { Coupons } from "../../../../../../../../components/settings/Account/Billing/SubscriptionCoupons/Coupons"; import { getValidAccount } from "../../../../../../account/settings/getAccount"; -import { getAuthToken } from "../../../../../../api/lib/getAuthToken"; import { CreditBalanceSection } from "./components/credit-balance-section.client"; import { PlanInfoCardClient } from "./components/PlanInfoCard.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/SettingsCreditsPage.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/SettingsCreditsPage.tsx index ec9c1baf40c..438a2f7c9a1 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/SettingsCreditsPage.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/SettingsCreditsPage.tsx @@ -1,9 +1,9 @@ "use client"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; -import { ApplyForOpCredits } from "components/onboarding/ApplyForOpCreditsModal"; +import { ApplyForOpCredits } from "@app/team/[team_slug]/(team)/~/settings/credits/components/ApplyForOpCreditsModal"; import type { Team } from "@/api/team"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; +import type { Account } from "@/hooks/useApi"; export const SettingsGasCreditsPage = (props: { team: Team; diff --git a/apps/dashboard/src/components/onboarding/ApplyForOpCreditsForm.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/components/ApplyForOpCreditsForm.tsx similarity index 96% rename from apps/dashboard/src/components/onboarding/ApplyForOpCreditsForm.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/components/ApplyForOpCreditsForm.tsx index 55d913f3360..478cd6dc9b0 100644 --- a/apps/dashboard/src/components/onboarding/ApplyForOpCreditsForm.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/components/ApplyForOpCreditsForm.tsx @@ -1,15 +1,15 @@ -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { Flex, FormControl } from "@chakra-ui/react"; +import { FormHelperText, FormLabel } from "chakra/form"; import { Select as ChakraSelect } from "chakra-react-select"; -import { useLocalStorage } from "hooks/useLocalStorage"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { useMemo } from "react"; import { useForm } from "react-hook-form"; -import { FormHelperText, FormLabel } from "tw-components"; import type { Team } from "@/api/team"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; +import type { Account } from "@/hooks/useApi"; +import { useLocalStorage } from "@/hooks/useLocalStorage"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import { PlanToCreditsRecord } from "./ApplyForOpCreditsModal"; import { applyOpSponsorship } from "./applyOpSponsorship"; diff --git a/apps/dashboard/src/components/onboarding/ApplyForOpCreditsModal.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/components/ApplyForOpCreditsModal.tsx similarity index 95% rename from apps/dashboard/src/components/onboarding/ApplyForOpCreditsModal.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/components/ApplyForOpCreditsModal.tsx index 404878fe16b..528189f71a2 100644 --- a/apps/dashboard/src/components/onboarding/ApplyForOpCreditsModal.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/components/ApplyForOpCreditsModal.tsx @@ -1,8 +1,7 @@ -import { type Account, accountPlan } from "@3rdweb-sdk/react/hooks/useApi"; -import { useLocalStorage } from "hooks/useLocalStorage"; import { ArrowRightIcon, CircleAlertIcon } from "lucide-react"; import { useState } from "react"; import type { Team } from "@/api/team"; +import { TeamPlanBadge } from "@/components/blocks/TeamPlanBadge"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { @@ -13,8 +12,9 @@ import { SheetTrigger, } from "@/components/ui/sheet"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; -import { TeamPlanBadge } from "../../app/(app)/components/TeamPlanBadge"; -import { getValidTeamPlan } from "../../app/(app)/team/components/TeamHeader/getValidTeamPlan"; +import { type Account, accountPlan } from "@/hooks/useApi"; +import { useLocalStorage } from "@/hooks/useLocalStorage"; +import { getValidTeamPlan } from "@/utils/getValidTeamPlan"; import { ApplyForOpCreditsForm } from "./ApplyForOpCreditsForm"; import { PlanCard } from "./PlanCard"; diff --git a/apps/dashboard/src/components/onboarding/PlanCard.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/components/PlanCard.tsx similarity index 95% rename from apps/dashboard/src/components/onboarding/PlanCard.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/components/PlanCard.tsx index 419cec74e07..f3769d9f320 100644 --- a/apps/dashboard/src/components/onboarding/PlanCard.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/components/PlanCard.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; +import { TeamPlanBadge } from "@/components/blocks/TeamPlanBadge"; import { Button } from "@/components/ui/button"; -import { TeamPlanBadge } from "../../app/(app)/components/TeamPlanBadge"; import type { CreditsRecord } from "./ApplyForOpCreditsModal"; type PlanCardProps = { diff --git a/apps/dashboard/src/components/onboarding/applyOpSponsorship.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/components/applyOpSponsorship.ts similarity index 100% rename from apps/dashboard/src/components/onboarding/applyOpSponsorship.ts rename to apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/components/applyOpSponsorship.ts diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/page.tsx index 9c540516118..1c6feabb184 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/credits/page.tsx @@ -1,6 +1,6 @@ +import { ChakraProviderSetup } from "chakra/ChakraProviderSetup"; import { redirect } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; -import { ChakraProviderSetup } from "@/components/ChakraProviderSetup"; import { getValidAccount } from "../../../../../../account/settings/getAccount"; import { SettingsGasCreditsPage } from "./SettingsCreditsPage"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.stories.tsx index 15e597ef5d7..f72230bf17e 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { teamStub } from "stories/stubs"; -import { storybookThirdwebClient } from "stories/utils"; +import { teamStub } from "@/storybook/stubs"; +import { storybookThirdwebClient } from "@/storybook/utils"; import { DeleteTeamCard, LeaveTeamCard, diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/Sidebar.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/Sidebar.stories.tsx index 63fe5f69b16..21dc40924c4 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/Sidebar.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/Sidebar.stories.tsx @@ -1,10 +1,10 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { teamStub } from "stories/stubs"; +import { teamStub } from "@/storybook/stubs"; import { BadgeContainer, mobileViewport, storybookThirdwebClient, -} from "stories/utils"; +} from "@/storybook/utils"; import { TeamSettingsSidebar } from "../_components/sidebar/TeamSettingsSidebar"; import { TeamSettingsMobileNav } from "../_components/sidebar/TeamsMobileNav"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/TeamGeneralSettingsPageUI.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/TeamGeneralSettingsPageUI.tsx index d4af7099e94..b9544665590 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/TeamGeneralSettingsPageUI.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/TeamGeneralSettingsPageUI.tsx @@ -2,7 +2,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; -import { FileInput } from "components/shared/FileInput"; import { useState } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; @@ -12,11 +11,12 @@ import { deleteTeam } from "@/actions/deleteTeam"; import type { Team } from "@/api/team"; import type { VerifiedDomainResponse } from "@/api/verified-domain"; import { DangerSettingCard } from "@/components/blocks/DangerSettingCard"; +import { FileInput } from "@/components/blocks/FileInput"; import { SettingsCard } from "@/components/blocks/SettingsCard"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { Input } from "@/components/ui/input"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; import { TeamDedicatedSupportCard } from "../_components/settings-cards/dedicated-support"; import { TeamDomainVerificationCard } from "../_components/settings-cards/domain-verification"; import { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/updateTeam.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/updateTeam.ts index 29424e5b482..cb731afa028 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/updateTeam.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/updateTeam.ts @@ -2,7 +2,7 @@ import type { Team } from "@/api/team"; import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; -import { getAuthToken } from "../../../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../../../@/api/auth-token"; export async function updateTeam(params: { teamId: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/layout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/layout.tsx index 384bd0a57e4..db2e5452a8c 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/layout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/layout.tsx @@ -1,8 +1,8 @@ import { redirect } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { getAuthToken } from "../../../../../../../@/api/auth-token"; import { getValidAccount } from "../../../../../account/settings/getAccount"; -import { getAuthToken } from "../../../../../api/lib/getAuthToken"; import { loginRedirect } from "../../../../../login/loginRedirect"; import { SettingsLayout } from "./SettingsLayout"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.stories.tsx index a43ff4f10ff..23a1e3b2475 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.stories.tsx @@ -1,10 +1,10 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useId, useState } from "react"; -import { teamStub } from "stories/stubs"; import type { TeamAccountRole } from "@/api/team-members"; import { Label } from "@/components/ui/label"; import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; -import { storybookThirdwebClient } from "../../../../../../../../stories/utils"; +import { teamStub } from "@/storybook/stubs"; +import { storybookThirdwebClient } from "../../../../../../../../@/storybook/utils"; import { InviteSection } from "./InviteSection"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.tsx index ffc576f6f28..5bb394c861a 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.tsx @@ -17,7 +17,7 @@ import type { ThirdwebClient } from "thirdweb"; import { z } from "zod"; import type { Team } from "@/api/team"; import type { TeamAccountRole } from "@/api/team-members"; -import { GradientAvatar } from "@/components/blocks/Avatars/GradientAvatar"; +import { GradientAvatar } from "@/components/blocks/avatar/gradient-avatar"; import { Button } from "@/components/ui/button"; import { Form, @@ -36,9 +36,9 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; import { cn } from "@/lib/utils"; -import { getValidTeamPlan } from "../../../../../components/TeamHeader/getValidTeamPlan"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; +import { getValidTeamPlan } from "../../../../../../../../@/utils/getValidTeamPlan"; const inviteFormSchema = z.object({ invites: z diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/ManageInvitesSection.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/ManageInvitesSection.stories.tsx index 42d614a415b..07491ee6729 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/ManageInvitesSection.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/ManageInvitesSection.stories.tsx @@ -1,8 +1,8 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { teamStub } from "stories/stubs"; -import { BadgeContainer, storybookThirdwebClient } from "stories/utils"; import type { TeamInvite } from "@/api/team-invites"; import type { TeamAccountRole } from "@/api/team-members"; +import { teamStub } from "@/storybook/stubs"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { ManageInvitesSection } from "./ManageInvitesSection"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/ManageMembersSection.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/ManageMembersSection.tsx index d8060e257ec..a89224c7af0 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/ManageMembersSection.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/ManageMembersSection.tsx @@ -8,7 +8,7 @@ import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; import type { Team } from "@/api/team"; import type { TeamAccountRole, TeamMember } from "@/api/team-members"; -import { GradientAvatar } from "@/components/blocks/Avatars/GradientAvatar"; +import { GradientAvatar } from "@/components/blocks/avatar/gradient-avatar"; import { Button } from "@/components/ui/button"; import { Dialog, diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/TeamMembersSettingsPage.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/TeamMembersSettingsPage.stories.tsx index aa12afa9e80..585409dd59a 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/TeamMembersSettingsPage.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/TeamMembersSettingsPage.stories.tsx @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { teamStub } from "stories/stubs"; -import { BadgeContainer, storybookThirdwebClient } from "stories/utils"; import type { TeamAccountRole, TeamMember } from "@/api/team-members"; +import { teamStub } from "@/storybook/stubs"; +import { BadgeContainer, storybookThirdwebClient } from "@/storybook/utils"; import { ManageMembersSection } from "./ManageMembersSection"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/page.tsx index b03ca87c947..615b6146f1c 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/page.tsx @@ -3,8 +3,8 @@ import { getTeamBySlug } from "@/api/team"; import { getTeamInvites } from "@/api/team-invites"; import { getMembers } from "@/api/team-members"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { getAuthToken } from "../../../../../../../../@/api/auth-token"; import { getValidAccount } from "../../../../../../account/settings/getAccount"; -import { getAuthToken } from "../../../../../../api/lib/getAuthToken"; import { getRecommendedMembers } from "./getRecommendedMembers"; import { TeamMembersSettingsPage } from "./TeamMembersSettingsPage"; diff --git a/apps/dashboard/src/components/settings/Account/Notifications.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/Notifications.tsx similarity index 93% rename from apps/dashboard/src/components/settings/Account/Notifications.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/Notifications.tsx index 6ddf7a859db..63062f0b811 100644 --- a/apps/dashboard/src/components/settings/Account/Notifications.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/Notifications.tsx @@ -1,13 +1,10 @@ "use client"; -import { - type Account, - useUpdateNotifications, -} from "@3rdweb-sdk/react/hooks/useApi"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { useId, useState } from "react"; import { Label } from "@/components/ui/label"; import { Switch } from "@/components/ui/switch"; +import { type Account, useUpdateNotifications } from "@/hooks/useApi"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface NotificationsProps { account: Account; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/NotificationsPage.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/NotificationsPage.tsx index de9726ddcf2..dd91a734859 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/NotificationsPage.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/NotificationsPage.tsx @@ -1,6 +1,6 @@ -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; -import { Notifications } from "components/settings/Account/Notifications"; +import { Notifications } from "@app/team/[team_slug]/(team)/~/settings/notifications/Notifications"; import { Separator } from "@/components/ui/separator"; +import type { Account } from "@/hooks/useApi"; export const SettingsNotificationsPage = (props: { account: Account }) => { return ( diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/page.tsx index 7fb1d9b2d46..8c9dc970b69 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/page.tsx @@ -1,4 +1,4 @@ -import { ChakraProviderSetup } from "@/components/ChakraProviderSetup"; +import { ChakraProviderSetup } from "chakra/ChakraProviderSetup"; import { getValidAccount } from "../../../../../../account/settings/getAccount"; import { SettingsNotificationsPage } from "./NotificationsPage"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/page.tsx index 3250c95d347..19d68036e6c 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/page.tsx @@ -3,8 +3,8 @@ import { getTeamBySlug } from "@/api/team"; import { getMemberByAccountId } from "@/api/team-members"; import { checkDomainVerification } from "@/api/verified-domain"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { getAuthToken } from "../../../../../../../@/api/auth-token"; import { getValidAccount } from "../../../../../account/settings/getAccount"; -import { getAuthToken } from "../../../../../api/lib/getAuthToken"; import { TeamGeneralSettingsPage } from "./general/TeamGeneralSettingsPage"; export default async function Page(props: { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/account-abstraction/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/account-abstraction/page.tsx index cebee6b8d74..7ed471d05bb 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/account-abstraction/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/account-abstraction/page.tsx @@ -1,9 +1,9 @@ import { redirect } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { getAuthToken } from "../../../../../../../../@/api/auth-token"; import { getProjects } from "../../../../../../../../@/api/projects"; import { getTeamSubscriptions } from "../../../../../../../../@/api/team-subscription"; -import { getAuthToken } from "../../../../../../api/lib/getAuthToken"; import { loginRedirect } from "../../../../../../login/loginRedirect"; import { SponsoredTransactionsTable } from "../overview/components/SponsoredTransactionsTable"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.stories.tsx index e1a8eaee76f..59b0015450a 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.stories.tsx @@ -1,10 +1,10 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useId, useState } from "react"; -import { projectStub } from "stories/stubs"; -import { storybookThirdwebClient } from "stories/utils"; import { ThirdwebProvider } from "thirdweb/react"; import { Label } from "@/components/ui/label"; import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; +import { projectStub } from "@/storybook/stubs"; +import { storybookThirdwebClient } from "@/storybook/utils"; import { type SponsoredTransaction, SponsoredTransactionsTableUI, diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.tsx index 55cfde35684..1979044f62b 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.tsx @@ -1,16 +1,14 @@ "use client"; -import { ChainIconClient } from "components/icons/ChainIcon"; import { format, formatDistance } from "date-fns"; -import { useAllChainsData } from "hooks/chains/allChains"; import { ExternalLinkIcon, XIcon } from "lucide-react"; import Link from "next/link"; import type { ThirdwebClient } from "thirdweb"; -import { ProjectAvatar } from "@/components/blocks/Avatars/ProjectAvatar"; +import { ProjectAvatar } from "@/components/blocks/avatar/project-avatar"; import { ExportToCSVButton } from "@/components/blocks/ExportToCSVButton"; import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; import { SelectWithSearch } from "@/components/blocks/select-with-search"; import { WalletAddress } from "@/components/blocks/wallet-address"; -import { PaginationButtons } from "@/components/pagination-buttons"; import { Button } from "@/components/ui/button"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { Skeleton } from "@/components/ui/skeleton"; @@ -24,6 +22,8 @@ import { TableRow, } from "@/components/ui/table"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { ChainIconClient } from "@/icons/ChainIcon"; import { cn } from "@/lib/utils"; export type SponsoredTransaction = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/rpc/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/rpc/page.tsx index 81bf5ef42ac..2ae1866a165 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/rpc/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/rpc/page.tsx @@ -6,12 +6,12 @@ import { XCircleIcon, } from "lucide-react"; import { redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getTeamBySlug } from "@/api/team"; import { getLast24HoursRPCUsage } from "@/api/usage/rpc"; +import { TeamPlanBadge } from "@/components/blocks/TeamPlanBadge"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; -import { getAuthToken } from "../../../../../../api/lib/getAuthToken"; -import { TeamPlanBadge } from "../../../../../../components/TeamPlanBadge"; import { loginRedirect } from "../../../../../../login/loginRedirect"; import { CountGraph } from "./components/count-graph"; import { RateGraph } from "./components/rate-graph"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/components/SDKSection.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/components/SDKSection.tsx index d88511deefb..e35ff9c3a80 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/components/SDKSection.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/components/SDKSection.tsx @@ -4,7 +4,7 @@ import { useState } from "react"; import { type CodeEnvironment, CodeSegment, -} from "@/components/blocks/code-segment.client"; +} from "@/components/blocks/code/code-segment.client"; export function SDKSection() { const [codeEnvironment, setCodeEnvironment] = diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/page.tsx index cd21f7c3ae6..ca80320efd1 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/page.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; import { PlainTextCodeBlock } from "@/components/ui/code/plaintext-code"; -import { getAuthToken } from "../../../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../../../@/api/auth-token"; import { loginRedirect } from "../../../../../../login/loginRedirect"; import { GuidesSection } from "./components/GuideSection"; import { SDKSection } from "./components/SDKSection"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/your-files.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/your-files.tsx index e5bf79a0842..0329d5fe388 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/your-files.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/storage/your-files.tsx @@ -5,8 +5,7 @@ import { format, formatDistance } from "date-fns"; import { PinOffIcon } from "lucide-react"; import { useState } from "react"; import { useActiveAccount } from "thirdweb/react"; -import { toSize } from "utils/number"; -import { PaginationButtons } from "@/components/pagination-buttons"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; import { Button } from "@/components/ui/button"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { Spinner } from "@/components/ui/Spinner/Spinner"; @@ -21,6 +20,7 @@ import { } from "@/components/ui/table"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { NEXT_PUBLIC_DASHBOARD_UPLOAD_SERVER } from "@/constants/public-envs"; +import { toSize } from "@/utils/number"; interface PinnedFilesResponse { result: PinnedFilesResult; diff --git a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/AccountAbstractionSummary.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/AccountAbstractionSummary.tsx similarity index 93% rename from apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/AccountAbstractionSummary.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/AccountAbstractionSummary.tsx index 5e4c5e64531..cd948396b30 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/AccountAbstractionSummary.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/AccountAbstractionSummary.tsx @@ -1,8 +1,8 @@ -import { StatCard } from "components/analytics/stat"; import { ActivityIcon, CoinsIcon } from "lucide-react"; import { Suspense } from "react"; -import type { UserOpStats } from "types/analytics"; import { getAggregateUserOpUsage } from "@/api/analytics"; +import { StatCard } from "@/components/analytics/stat"; +import type { UserOpStats } from "@/types/analytics"; function AccountAbstractionSummaryInner(props: { aggregateUserOpUsageQuery: UserOpStats | undefined; diff --git a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.stories.tsx similarity index 96% rename from apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.stories.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.stories.tsx index 8289df90a00..b948dac540c 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { SponsoredTransactionsChartCard } from "./SponsoredTransactionsChartCard"; import { createUserOpStatsStub } from "./storyUtils"; diff --git a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.tsx similarity index 90% rename from apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.tsx index 2554ba6fc38..3895e9c35a5 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/SponsoredTransactionsChartCard.tsx @@ -1,19 +1,19 @@ "use client"; -import { DotNetIcon } from "components/icons/brand-icons/DotNetIcon"; -import { ReactIcon } from "components/icons/brand-icons/ReactIcon"; -import { TypeScriptIcon } from "components/icons/brand-icons/TypeScriptIcon"; -import { UnityIcon } from "components/icons/brand-icons/UnityIcon"; -import { UnrealIcon } from "components/icons/brand-icons/UnrealIcon"; -import { DocLink } from "components/shared/DocLink"; import { format } from "date-fns"; -import { useAllChainsData } from "hooks/chains/allChains"; import { useMemo } from "react"; -import type { UserOpStats } from "types/analytics"; import { ThirdwebBarChart } from "@/components/blocks/charts/bar-chart"; +import { DocLink } from "@/components/blocks/DocLink"; import { ExportToCSVButton } from "@/components/blocks/ExportToCSVButton"; import type { ChartConfig } from "@/components/ui/chart"; -import { formatTickerNumber } from "../../../lib/format-utils"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { DotNetIcon } from "@/icons/brand-icons/DotNetIcon"; +import { ReactIcon } from "@/icons/brand-icons/ReactIcon"; +import { TypeScriptIcon } from "@/icons/brand-icons/TypeScriptIcon"; +import { UnityIcon } from "@/icons/brand-icons/UnityIcon"; +import { UnrealIcon } from "@/icons/brand-icons/UnrealIcon"; +import type { UserOpStats } from "@/types/analytics"; +import { formatTickerNumber } from "@/utils/format-utils"; type ChartData = Record & { time: string; diff --git a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/TotalSponsoredChartCard.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/TotalSponsoredChartCard.stories.tsx similarity index 96% rename from apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/TotalSponsoredChartCard.stories.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/TotalSponsoredChartCard.stories.tsx index 7ee0f1e37ca..d49c7b04b78 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/TotalSponsoredChartCard.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/TotalSponsoredChartCard.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { createUserOpStatsStub } from "./storyUtils"; import { TotalSponsoredChartCard } from "./TotalSponsoredChartCard"; diff --git a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/TotalSponsoredChartCard.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/TotalSponsoredChartCard.tsx similarity index 91% rename from apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/TotalSponsoredChartCard.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/TotalSponsoredChartCard.tsx index 6074e0836d7..67b54d46a7f 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/TotalSponsoredChartCard.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/TotalSponsoredChartCard.tsx @@ -1,19 +1,19 @@ "use client"; -import { DotNetIcon } from "components/icons/brand-icons/DotNetIcon"; -import { ReactIcon } from "components/icons/brand-icons/ReactIcon"; -import { TypeScriptIcon } from "components/icons/brand-icons/TypeScriptIcon"; -import { UnityIcon } from "components/icons/brand-icons/UnityIcon"; -import { UnrealIcon } from "components/icons/brand-icons/UnrealIcon"; -import { DocLink } from "components/shared/DocLink"; import { format } from "date-fns"; -import { useAllChainsData } from "hooks/chains/allChains"; import { useMemo } from "react"; -import type { UserOpStats } from "types/analytics"; import { ThirdwebBarChart } from "@/components/blocks/charts/bar-chart"; +import { DocLink } from "@/components/blocks/DocLink"; import { ExportToCSVButton } from "@/components/blocks/ExportToCSVButton"; import type { ChartConfig } from "@/components/ui/chart"; -import { toUSD } from "../../../utils/number"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { DotNetIcon } from "@/icons/brand-icons/DotNetIcon"; +import { ReactIcon } from "@/icons/brand-icons/ReactIcon"; +import { TypeScriptIcon } from "@/icons/brand-icons/TypeScriptIcon"; +import { UnityIcon } from "@/icons/brand-icons/UnityIcon"; +import { UnrealIcon } from "@/icons/brand-icons/UnrealIcon"; +import type { UserOpStats } from "@/types/analytics"; +import { toUSD } from "@/utils/number"; type ChartData = Record & { time: string; // human readable date diff --git a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/index.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/index.tsx similarity index 94% rename from apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/index.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/index.tsx index c09be93fe40..6d8cf348c1a 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/index.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/index.tsx @@ -1,17 +1,17 @@ "use client"; import { SponsoredTransactionsTable } from "@app/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTable"; import { searchParams } from "@app/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/search-params"; -import { - DateRangeSelector, - getLastNDaysRange, - type Range, -} from "components/analytics/date-range-selector"; -import { IntervalSelector } from "components/analytics/interval-selector"; import { differenceInDays } from "date-fns"; import { useQueryState } from "nuqs"; import { useTransition } from "react"; import type { ThirdwebClient } from "thirdweb"; -import type { UserOpStats } from "types/analytics"; +import { + DateRangeSelector, + getLastNDaysRange, + type Range, +} from "@/components/analytics/date-range-selector"; +import { IntervalSelector } from "@/components/analytics/interval-selector"; +import type { UserOpStats } from "@/types/analytics"; import { SponsoredTransactionsChartCard } from "./SponsoredTransactionsChartCard"; import { TotalSponsoredChartCard } from "./TotalSponsoredChartCard"; diff --git a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/storyUtils.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/storyUtils.ts similarity index 92% rename from apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/storyUtils.ts rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/storyUtils.ts index c24a7a9e55f..f9a91f77780 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountAbstractionAnalytics/storyUtils.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionAnalytics/storyUtils.ts @@ -1,4 +1,4 @@ -import type { UserOpStats } from "types/analytics"; +import type { UserOpStats } from "@/types/analytics"; export function createUserOpStatsStub(days: number): UserOpStats[] { const stubbedData: UserOpStats[] = []; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionPage.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionPage.tsx index 424ce91f4e0..77cca5b82c9 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionPage.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionPage.tsx @@ -1,6 +1,6 @@ "use client"; -import { SmartWalletsBillingAlert } from "components/settings/ApiKeys/Alerts"; +import { SmartWalletsBillingAlert } from "@app/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/Alerts"; import { ArrowRightIcon } from "lucide-react"; import Link from "next/link"; import { DismissibleAlert } from "@/components/blocks/dismissible-alert"; diff --git a/apps/dashboard/src/components/settings/ApiKeys/Alerts.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/Alerts.tsx similarity index 100% rename from apps/dashboard/src/components/settings/ApiKeys/Alerts.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/Alerts.tsx diff --git a/apps/dashboard/src/components/smart-wallets/AccountFactories/account-cell.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/AccountFactories/account-cell.tsx similarity index 94% rename from apps/dashboard/src/components/smart-wallets/AccountFactories/account-cell.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/AccountFactories/account-cell.tsx index 402bde567a2..ce532d80e71 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountFactories/account-cell.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/AccountFactories/account-cell.tsx @@ -5,7 +5,7 @@ import { getContract, type ThirdwebClient } from "thirdweb"; import { getAllAccounts } from "thirdweb/extensions/erc4337"; import { useReadContract } from "thirdweb/react"; import { SkeletonContainer } from "@/components/ui/skeleton"; -import { useV5DashboardChain } from "../../../lib/v5-adapter"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; function useAccountCount( address: string, diff --git a/apps/dashboard/src/components/smart-wallets/AccountFactories/factory-contracts.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/AccountFactories/factory-contracts.tsx similarity index 89% rename from apps/dashboard/src/components/smart-wallets/AccountFactories/factory-contracts.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/AccountFactories/factory-contracts.tsx index ebd03fa9ab4..cc44f903e93 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountFactories/factory-contracts.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/AccountFactories/factory-contracts.tsx @@ -1,11 +1,10 @@ "use client"; import { useQuery } from "@tanstack/react-query"; -import { ContractNameCell } from "components/contract-components/tables/cells"; -import { FactoryAccountCell } from "components/smart-wallets/AccountFactories/account-cell"; -import { useV5DashboardChain } from "lib/v5-adapter"; import type { ThirdwebClient } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; +import type { ProjectContract } from "@/api/getProjectContracts"; +import { ContractNameCell } from "@/components/contract-components/tables/cells"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; import { SkeletonContainer } from "@/components/ui/skeleton"; import { @@ -17,7 +16,8 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; -import type { ProjectContract } from "../../../app/(app)/account/contracts/_components/getProjectContracts"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; +import { FactoryAccountCell } from "./account-cell"; interface FactoryContractsProps { contracts: ProjectContract[]; diff --git a/apps/dashboard/src/components/smart-wallets/AccountFactories/index.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/AccountFactories/index.tsx similarity index 100% rename from apps/dashboard/src/components/smart-wallets/AccountFactories/index.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/AccountFactories/index.tsx diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/page.tsx index e84f6428b2e..bd948478111 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/page.tsx @@ -1,14 +1,12 @@ import { getSortedDeployedContracts } from "@app/account/contracts/_components/getSortedDeployedContracts"; -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { loginRedirect } from "@app/login/loginRedirect"; -import { DefaultFactoriesSection } from "components/smart-wallets/AccountFactories"; -import { FactoryContracts } from "components/smart-wallets/AccountFactories/factory-contracts"; import { PlusIcon } from "lucide-react"; import Link from "next/link"; import { redirect } from "next/navigation"; import { Suspense } from "react"; import { defineChain, getContract, type ThirdwebClient } from "thirdweb"; import { getCompilerMetadata } from "thirdweb/contract"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; import { ClientOnly } from "@/components/blocks/client-only"; @@ -17,6 +15,8 @@ import { Button } from "@/components/ui/button"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; +import { DefaultFactoriesSection } from "./AccountFactories"; +import { FactoryContracts } from "./AccountFactories/factory-contracts"; export default async function Page(props: { params: Promise<{ team_slug: string; project_slug: string }>; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/layout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/layout.tsx index 63f69d949c5..6042c80277a 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/layout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/layout.tsx @@ -1,8 +1,8 @@ -import { getAbsoluteUrl } from "lib/vercel-utils"; import type { Metadata } from "next"; import { redirect } from "next/navigation"; import { getProject } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; +import { getAbsoluteUrl } from "@/utils/vercel"; import { AccountAbstractionLayout } from "./AccountAbstractionPage"; export default async function Page(props: { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/page.tsx index ec7fb29a635..cc81d9e6943 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/page.tsx @@ -1,16 +1,16 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; -import { - getLastNDaysRange, - type Range, -} from "components/analytics/date-range-selector"; -import { AccountAbstractionAnalytics } from "components/smart-wallets/AccountAbstractionAnalytics"; -import { AccountAbstractionSummary } from "components/smart-wallets/AccountAbstractionAnalytics/AccountAbstractionSummary"; import { notFound, redirect } from "next/navigation"; import type { SearchParams } from "nuqs/server"; import { getUserOpUsage } from "@/api/analytics"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; +import { + getLastNDaysRange, + type Range, +} from "@/components/analytics/date-range-selector"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { AccountAbstractionAnalytics } from "./AccountAbstractionAnalytics"; +import { AccountAbstractionSummary } from "./AccountAbstractionAnalytics/AccountAbstractionSummary"; import { searchParamLoader } from "./search-params"; interface PageParams { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/search-params.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/search-params.ts index f4b571e3594..97fee1663bd 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/search-params.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/search-params.ts @@ -1,5 +1,5 @@ -import { getLastNDaysRange } from "components/analytics/date-range-selector"; import { createLoader, parseAsIsoDate, parseAsStringEnum } from "nuqs/server"; +import { getLastNDaysRange } from "@/components/analytics/date-range-selector"; export const searchParams = { from: parseAsIsoDate.withDefault(getLastNDaysRange("last-120").from), diff --git a/apps/dashboard/src/components/smart-wallets/SponsorshipPolicies/index.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/settings/SponsorshipPolicies/index.tsx similarity index 98% rename from apps/dashboard/src/components/smart-wallets/SponsorshipPolicies/index.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/settings/SponsorshipPolicies/index.tsx index dc8fde603dd..0aab8312db0 100644 --- a/apps/dashboard/src/components/smart-wallets/SponsorshipPolicies/index.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/settings/SponsorshipPolicies/index.tsx @@ -1,6 +1,5 @@ "use client"; -import { updateProjectClient } from "@3rdweb-sdk/react/hooks/useApi"; import { Box, Divider, @@ -15,20 +14,23 @@ import { import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; import type { ProjectBundlerService } from "@thirdweb-dev/service-utils"; -import { GatedSwitch } from "components/settings/Account/Billing/GatedSwitch"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { FormErrorMessage, FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { TrashIcon } from "lucide-react"; import { useMemo } from "react"; import { useFieldArray, useForm } from "react-hook-form"; import { isAddress, type ThirdwebClient } from "thirdweb"; -import { Button, FormErrorMessage, FormLabel, Text } from "tw-components"; -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"; +import { GatedSwitch } from "@/components/blocks/GatedSwitch"; import { MultiNetworkSelector } from "@/components/blocks/NetworkSelectors"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; +import { updateProjectClient } from "@/hooks/useApi"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { joinWithComma, toArrFromList } from "@/utils/string"; +import { validStrList } from "@/utils/validations"; type AccountAbstractionSettingsPageProps = { bundlerService: ProjectBundlerService; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/settings/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/settings/page.tsx index 658af3f0b16..65a988cf944 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/settings/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/settings/page.tsx @@ -1,14 +1,14 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; -import { getValidTeamPlan } from "@app/team/components/TeamHeader/getValidTeamPlan"; -import { AccountAbstractionSettingsPage } from "components/smart-wallets/SponsorshipPolicies"; +import { AccountAbstractionSettingsPage } from "@app/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/settings/SponsorshipPolicies"; +import { ChakraProviderSetup } from "chakra/ChakraProviderSetup"; import { CircleAlertIcon } from "lucide-react"; import { redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; -import { ChakraProviderSetup } from "@/components/ChakraProviderSetup"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { getValidTeamPlan } from "@/utils/getValidTeamPlan"; export default async function Page(props: { params: Promise<{ team_slug: string; project_slug: string }>; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/EngineCloudBarChartCard.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/EngineCloudBarChartCard.stories.tsx index fa63a483718..93be7caed4a 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/EngineCloudBarChartCard.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/EngineCloudBarChartCard.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "stories/utils"; -import type { EngineCloudStats } from "types/analytics"; +import { BadgeContainer } from "@/storybook/utils"; +import type { EngineCloudStats } from "@/types/analytics"; import { EngineCloudBarChartCardUI } from "./EngineCloudBarChartCardUI"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/EngineCloudBarChartCardUI.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/EngineCloudBarChartCardUI.tsx index 48dc0f2325f..c90b53be925 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/EngineCloudBarChartCardUI.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/EngineCloudBarChartCardUI.tsx @@ -7,7 +7,6 @@ import { BarChart as RechartsBarChart, XAxis, } from "recharts"; -import type { EngineCloudStats } from "types/analytics"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { type ChartConfig, @@ -15,6 +14,7 @@ import { ChartTooltip, ChartTooltipContent, } from "@/components/ui/chart"; +import type { EngineCloudStats } from "@/types/analytics"; import { EmptyStateCard } from "../../../../../components/Analytics/EmptyStateCard"; export function EngineCloudBarChartCardUI({ diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/index.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/index.tsx index 3df548228a8..bc97c9ae5a6 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/index.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/index.tsx @@ -1,7 +1,7 @@ -import { LoadingChartState } from "components/analytics/empty-chart-state"; import { Suspense } from "react"; -import type { AnalyticsQueryParams } from "types/analytics"; import { getEngineCloudMethodUsage } from "@/api/analytics"; +import { LoadingChartState } from "@/components/analytics/empty-chart-state"; +import type { AnalyticsQueryParams } from "@/types/analytics"; import { EngineCloudBarChartCardUI } from "./EngineCloudBarChartCardUI"; export function EngineCloudChartCard(props: AnalyticsQueryParams) { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.stories.tsx index aec7630c91e..9efdf19b331 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { projectStub } from "stories/stubs"; +import { projectStub } from "@/storybook/stubs"; import { ProjectFTUX } from "./ProjectFTUX"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.tsx index e0beccc47ba..e29cac7b978 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.tsx @@ -1,9 +1,3 @@ -import { DotNetIcon } from "components/icons/brand-icons/DotNetIcon"; -import { GithubIcon } from "components/icons/brand-icons/GithubIcon"; -import { ReactIcon } from "components/icons/brand-icons/ReactIcon"; -import { TypeScriptIcon } from "components/icons/brand-icons/TypeScriptIcon"; -import { UnityIcon } from "components/icons/brand-icons/UnityIcon"; -import { UnrealIcon } from "components/icons/brand-icons/UnrealIcon"; import { ArrowLeftRightIcon, ChevronRightIcon, @@ -15,9 +9,15 @@ import type { Project } from "@/api/projects"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { CodeServer } from "@/components/ui/code/code.server"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; -import { ContractIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/ContractIcon"; -import { InsightIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/InsightIcon"; -import { PayIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/PayIcon"; +import { DotNetIcon } from "@/icons/brand-icons/DotNetIcon"; +import { GithubIcon } from "@/icons/brand-icons/GithubIcon"; +import { ReactIcon } from "@/icons/brand-icons/ReactIcon"; +import { TypeScriptIcon } from "@/icons/brand-icons/TypeScriptIcon"; +import { UnityIcon } from "@/icons/brand-icons/UnityIcon"; +import { UnrealIcon } from "@/icons/brand-icons/UnrealIcon"; +import { ContractIcon } from "@/icons/ContractIcon"; +import { InsightIcon } from "@/icons/InsightIcon"; +import { PayIcon } from "@/icons/PayIcon"; import { ClientIDSection } from "./ClientIDSection"; import { IntegrateAPIKeyCodeTabs } from "./IntegrateAPIKeyCodeTabs"; import { SecretKeySection } from "./SecretKeySection"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/SecretKeySection.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/SecretKeySection.tsx index 4b080a6a185..0dd204a0820 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/SecretKeySection.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/SecretKeySection.tsx @@ -1,7 +1,7 @@ "use client"; -import { rotateSecretKeyClient } from "@3rdweb-sdk/react/hooks/useApi"; import { useState } from "react"; +import { rotateSecretKeyClient } from "@/hooks/useApi"; import { RotateSecretKeyButton } from "../../settings/ProjectGeneralSettingsPage"; export function SecretKeySection(props: { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectSidebarLayout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectSidebarLayout.tsx index 53228fae309..911eb532b08 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectSidebarLayout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectSidebarLayout.tsx @@ -12,10 +12,10 @@ import { } from "lucide-react"; import { FullWidthSidebarLayout } from "@/components/blocks/SidebarLayout"; import { Badge } from "@/components/ui/badge"; -import { ContractIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/ContractIcon"; -import { InsightIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/InsightIcon"; -import { PayIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/PayIcon"; -import { SmartAccountIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/SmartAccountIcon"; +import { ContractIcon } from "@/icons/ContractIcon"; +import { InsightIcon } from "@/icons/InsightIcon"; +import { PayIcon } from "@/icons/PayIcon"; +import { SmartAccountIcon } from "@/icons/SmartAccountIcon"; export function ProjectSidebarLayout(props: { layoutPath: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/RpcMethodBarChartCard.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/RpcMethodBarChartCard.stories.tsx index 1b8c5f24c5f..9d90c4569ec 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/RpcMethodBarChartCard.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/RpcMethodBarChartCard.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "stories/utils"; -import type { RpcMethodStats } from "types/analytics"; +import { BadgeContainer } from "@/storybook/utils"; +import type { RpcMethodStats } from "@/types/analytics"; import { RpcMethodBarChartCardUI } from "./RpcMethodBarChartCardUI"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/RpcMethodBarChartCardUI.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/RpcMethodBarChartCardUI.tsx index fda28a3b9ae..7de76c16f96 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/RpcMethodBarChartCardUI.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/RpcMethodBarChartCardUI.tsx @@ -7,7 +7,6 @@ import { BarChart as RechartsBarChart, XAxis, } from "recharts"; -import type { RpcMethodStats } from "types/analytics"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { type ChartConfig, @@ -15,6 +14,7 @@ import { ChartTooltip, ChartTooltipContent, } from "@/components/ui/chart"; +import type { RpcMethodStats } from "@/types/analytics"; import { EmptyStateCard } from "../../../../../components/Analytics/EmptyStateCard"; export function RpcMethodBarChartCardUI({ diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/index.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/index.tsx index a61d286582f..53adf3159ca 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/index.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/RpcMethodBarChartCard/index.tsx @@ -1,7 +1,7 @@ -import { LoadingChartState } from "components/analytics/empty-chart-state"; import { Suspense } from "react"; -import type { AnalyticsQueryParams } from "types/analytics"; import { getRpcMethodUsage } from "@/api/analytics"; +import { LoadingChartState } from "@/components/analytics/empty-chart-state"; +import type { AnalyticsQueryParams } from "@/types/analytics"; import { RpcMethodBarChartCardUI } from "./RpcMethodBarChartCardUI"; export function RpcMethodBarChartCard(props: AnalyticsQueryParams) { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/SaveLastUsedProject.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/SaveLastUsedProject.ts index f9e4319aeab..d8854949c93 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/SaveLastUsedProject.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/SaveLastUsedProject.ts @@ -1,8 +1,8 @@ "use client"; -import { LAST_USED_PROJECT_ID, LAST_USED_TEAM_ID } from "constants/cookies"; -import { setCookie } from "lib/cookie"; import { useEffect } from "react"; +import { LAST_USED_PROJECT_ID, LAST_USED_TEAM_ID } from "@/constants/cookies"; +import { setCookie } from "@/utils/cookie"; export function SaveLastUsedProject(props: { projectId: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/Transactions/TransactionCharts.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/Transactions/TransactionCharts.tsx index f9aef8bc4ab..ae20c06aea5 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/Transactions/TransactionCharts.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/Transactions/TransactionCharts.tsx @@ -1,7 +1,7 @@ -import { fetchDashboardContractMetadata } from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata"; import { defineChain, getContract, type ThirdwebClient } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; -import type { TransactionStats } from "types/analytics"; +import { fetchDashboardContractMetadata } from "@/hooks/useDashboardContractMetadata"; +import type { TransactionStats } from "@/types/analytics"; import { PieChartCard } from "../../../../../components/Analytics/PieChartCard"; import { TransactionsChartCardUI } from "../../../../(team)/_components/TransactionsCard"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/Transactions/index.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/Transactions/index.tsx index b85f2814125..56c7bcbc410 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/Transactions/index.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/Transactions/index.tsx @@ -1,8 +1,8 @@ -import { LoadingChartState } from "components/analytics/empty-chart-state"; import { Suspense } from "react"; import type { ThirdwebClient } from "thirdweb"; -import type { AnalyticsQueryParams } from "types/analytics"; import { getClientTransactions } from "@/api/analytics"; +import { LoadingChartState } from "@/components/analytics/empty-chart-state"; +import type { AnalyticsQueryParams } from "@/types/analytics"; import { TransactionsChartsUI } from "./TransactionCharts"; export function TransactionsCharts( diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/layout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/layout.tsx index 319b8c08643..5f8e468652f 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/layout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/layout.tsx @@ -1,7 +1,7 @@ import { DeployedContractsPageHeader } from "@app/account/contracts/DeployedContractsPageHeader"; -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { loginRedirect } from "@app/login/loginRedirect"; import { redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; import { TabPathLinks } from "@/components/ui/tabs"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/page.tsx index ff86dd0db73..b8ae67cca06 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/page.tsx @@ -1,7 +1,7 @@ import { DeployedContractsPage } from "@app/account/contracts/_components/DeployedContractsPage"; -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { loginRedirect } from "@app/login/loginRedirect"; import { redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/webhooks/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/webhooks/page.tsx index 544be41ae64..c4085b5f4ce 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/webhooks/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/contracts/webhooks/page.tsx @@ -1,6 +1,6 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { loginRedirect } from "@app/login/loginRedirect"; import { redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/layout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/layout.tsx index 55e4acfa0df..e7967088f5e 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/layout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/layout.tsx @@ -4,7 +4,7 @@ import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { TabPathLinks } from "@/components/ui/tabs"; -import { EngineIcon } from "../../../../../../../(dashboard)/(chain)/components/server/icons/EngineIcon"; +import { EngineIcon } from "@/icons/EngineIcon"; import { ImportEngineLink } from "./_components"; export default async function Layout(props: { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.stories.tsx index e4451011f20..f31efa4420f 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.stories.tsx @@ -1,6 +1,6 @@ -import type { EngineInstance } from "@3rdweb-sdk/react/hooks/useEngine"; import type { Meta, StoryObj } from "@storybook/nextjs"; -import { teamStub } from "../../../../../../../../../../stories/stubs"; +import type { EngineInstance } from "@/hooks/useEngine"; +import { teamStub } from "../../../../../../../../../../@/storybook/stubs"; import { EngineInstancesTableUI } from "./engine-instances-table"; const meta: Meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx index efeea221dce..bc7bb70f69c 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx @@ -1,14 +1,5 @@ "use client"; -import { - type DeleteCloudHostedEngineParams, - deleteCloudHostedEngine, - type EditEngineInstanceParams, - type EngineInstance, - editEngineInstance, - type RemoveEngineFromDashboardIParams, - removeEngineFromDashboard, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; import { @@ -30,7 +21,7 @@ import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; import type { Team } from "@/api/team"; -import { CheckoutButton } from "@/components/billing"; +import { CheckoutButton } from "@/components/billing/billing"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Badge, type BadgeProps } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; @@ -81,9 +72,18 @@ import { } from "@/components/ui/table"; import { Textarea } from "@/components/ui/textarea"; import { useIsMobile } from "@/hooks/use-mobile"; +import { + type DeleteCloudHostedEngineParams, + deleteCloudHostedEngine, + type EditEngineInstanceParams, + type EngineInstance, + editEngineInstance, + type RemoveEngineFromDashboardIParams, + removeEngineFromDashboard, +} from "@/hooks/useEngine"; +import { EngineIcon } from "@/icons/EngineIcon"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import { cn } from "@/lib/utils"; -import { EngineIcon } from "../../../../../../../../(dashboard)/(chain)/components/server/icons/EngineIcon"; type DeletedCloudHostedEngine = ( params: DeleteCloudHostedEngineParams, diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-list.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-list.tsx index 332d5d3883e..8645889060d 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-list.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-list.tsx @@ -1,5 +1,5 @@ -import type { EngineInstance } from "@3rdweb-sdk/react/hooks/useEngine"; import type { Team } from "@/api/team"; +import type { EngineInstance } from "@/hooks/useEngine"; import { EngineFooterCard } from "../_components"; import { EngineInstancesTable } from "./engine-instances-table"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/page.tsx index ec46db560d3..b0609748c26 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/page.tsx @@ -1,6 +1,6 @@ import { redirect } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; -import { getAuthToken } from "../../../../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../../../../@/api/auth-token"; import { loginRedirect } from "../../../../../../../login/loginRedirect"; import { getEngineInstances } from "../_utils/getEngineInstances"; import { EngineInstancesList } from "./overview/engine-list"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/_components/EnsureEnginePermission.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/_components/EnsureEnginePermission.tsx index 79385f4b1ee..dcb96abf004 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/_components/EnsureEnginePermission.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/_components/EnsureEnginePermission.tsx @@ -1,9 +1,9 @@ "use client"; -import type { EngineInstance } from "@3rdweb-sdk/react/hooks/useEngine"; import { useQuery } from "@tanstack/react-query"; import type React from "react"; import { GenericLoadingPage } from "@/components/blocks/skeletons/GenericLoadingPage"; +import type { EngineInstance } from "@/hooks/useEngine"; import { getEngineAccessPermission } from "../../../_utils/getEngineAccessPermission"; import { EngineErrorPage } from "./EngineErrorPage"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/_components/version.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/_components/version.tsx index b980a11c521..39b3e5bd559 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/_components/version.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/_components/version.tsx @@ -1,11 +1,5 @@ "use client"; -import { - type EngineInstance, - useEngineGetDeploymentPublicConfiguration, - useEngineSystemHealth, - useEngineUpdateDeployment, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { formatDistanceToNow } from "date-fns"; import { CircleArrowUpIcon, TriangleAlertIcon } from "lucide-react"; import Link from "next/link"; @@ -33,6 +27,12 @@ import { SelectValue, } from "@/components/ui/select"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { + type EngineInstance, + useEngineGetDeploymentPublicConfiguration, + useEngineSystemHealth, + useEngineUpdateDeployment, +} from "@/hooks/useEngine"; export const EngineVersionBadge = ({ instance, diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/access-tokens-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/access-tokens-table.tsx index ad6db6039d6..cde5a34614a 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/access-tokens-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/access-tokens-table.tsx @@ -1,8 +1,3 @@ -import { - type AccessToken, - useEngineRevokeAccessToken, - useEngineUpdateAccessToken, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, @@ -18,14 +13,21 @@ import { useDisclosure, } from "@chakra-ui/react"; import { createColumnHelper } from "@tanstack/react-table"; -import { TWTable } from "components/shared/TWTable"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { PencilIcon, Trash2Icon } from "lucide-react"; import { useMemo, useState } from "react"; import type { ThirdwebClient } from "thirdweb"; -import { Button, FormLabel, Text } from "tw-components"; -import { toDateTimeLocal } from "utils/date-utils"; +import { TWTable } from "@/components/blocks/TWTable"; import { WalletAddress } from "@/components/blocks/wallet-address"; +import { + type AccessToken, + useEngineRevokeAccessToken, + useEngineUpdateAccessToken, +} from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { toDateTimeLocal } from "@/utils/date-utils"; interface AccessTokensTableProps { instanceUrl: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/add-access-token-button.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/add-access-token-button.tsx index 010645e3be9..9e1b02c7064 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/add-access-token-button.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/add-access-token-button.tsx @@ -1,4 +1,3 @@ -import { useEngineCreateAccessToken } from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, Modal, @@ -9,12 +8,14 @@ import { ModalOverlay, useDisclosure, } from "@chakra-ui/react"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { Text } from "chakra/text"; import { CirclePlusIcon } from "lucide-react"; import { useState } from "react"; -import { Button, Text } from "tw-components"; import { Checkbox, CheckboxWithLabel } from "@/components/ui/checkbox"; import { PlainTextCodeBlock } from "@/components/ui/code/plaintext-code"; +import { useEngineCreateAccessToken } from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface AddAccessTokenButtonProps { instanceUrl: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/add-keypair-button.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/add-keypair-button.tsx index c1962ea6e26..78a69675f79 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/add-keypair-button.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/add-keypair-button.tsx @@ -1,7 +1,3 @@ -import { - type KeypairAlgorithm, - useEngineAddKeypair, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Alert, Flex, @@ -17,11 +13,14 @@ import { Textarea, useDisclosure, } from "@chakra-ui/react"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { CirclePlusIcon } from "lucide-react"; import { useState } from "react"; -import { Button, FormLabel, Text } from "tw-components"; import { PlainTextCodeBlock } from "@/components/ui/code/plaintext-code"; +import { type KeypairAlgorithm, useEngineAddKeypair } from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; const KEYPAIR_ALGORITHM_DETAILS: Record< KeypairAlgorithm, diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/engine-access-tokens.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/engine-access-tokens.tsx index 94c9fbc4000..77009de1e0d 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/engine-access-tokens.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/engine-access-tokens.tsx @@ -1,16 +1,19 @@ "use client"; -import { - useEngineAccessTokens, - useEngineKeypairs, - useHasEngineFeature, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { ButtonGroup, Flex } from "@chakra-ui/react"; +import { Button } from "chakra/button"; +import { Heading } from "chakra/heading"; +import { Link } from "chakra/link"; +import { Text } from "chakra/text"; import { useState } from "react"; import type { ThirdwebClient } from "thirdweb"; -import { Button, Heading, Link, Text } from "tw-components"; import { CodeClient } from "@/components/ui/code/code.client"; import { InlineCode } from "@/components/ui/inline-code"; +import { + useEngineAccessTokens, + useEngineKeypairs, + useHasEngineFeature, +} from "@/hooks/useEngine"; import { AccessTokensTable } from "./access-tokens-table"; import { AddAccessTokenButton } from "./add-access-token-button"; import { AddKeypairButton } from "./add-keypair-button"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/keypairs-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/keypairs-table.tsx index 3c7ee527c32..14c3d24a3b9 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/keypairs-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/keypairs-table.tsx @@ -1,7 +1,3 @@ -import { - type Keypair, - useEngineRemoveKeypair, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, @@ -16,14 +12,17 @@ import { useDisclosure, } from "@chakra-ui/react"; import { createColumnHelper } from "@tanstack/react-table"; -import { TWTable } from "components/shared/TWTable"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { Trash2Icon } from "lucide-react"; import { useState } from "react"; -import { Button, FormLabel, Text } from "tw-components"; -import { toDateTimeLocal } from "utils/date-utils"; +import { TWTable } from "@/components/blocks/TWTable"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; import { PlainTextCodeBlock } from "@/components/ui/code/plaintext-code"; +import { type Keypair, useEngineRemoveKeypair } from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { toDateTimeLocal } from "@/utils/date-utils"; interface KeypairsTableProps { instanceUrl: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/add-admin-button.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/add-admin-button.tsx index 789d3d9812d..a3fa5fc306e 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/add-admin-button.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/add-admin-button.tsx @@ -1,7 +1,3 @@ -import { - type EngineAdmin, - useEngineGrantPermissions, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, @@ -15,11 +11,13 @@ import { ModalOverlay, useDisclosure, } from "@chakra-ui/react"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { FormLabel } from "chakra/form"; import { CirclePlusIcon } from "lucide-react"; import { useForm } from "react-hook-form"; import { isAddress } from "thirdweb"; -import { Button, FormLabel } from "tw-components"; +import { type EngineAdmin, useEngineGrantPermissions } from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface AddAdminButtonProps { instanceUrl: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/admins-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/admins-table.tsx index df1129272d5..e6f07f24397 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/admins-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/admins-table.tsx @@ -1,8 +1,3 @@ -import { - type EngineAdmin, - useEngineGrantPermissions, - useEngineRevokePermissions, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, @@ -18,14 +13,21 @@ import { useDisclosure, } from "@chakra-ui/react"; import { createColumnHelper } from "@tanstack/react-table"; -import { TWTable } from "components/shared/TWTable"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { PencilIcon, Trash2Icon } from "lucide-react"; import { useMemo, useState } from "react"; import type { ThirdwebClient } from "thirdweb"; -import { Button, FormLabel, Text } from "tw-components"; +import { TWTable } from "@/components/blocks/TWTable"; import { WalletAddress } from "@/components/blocks/wallet-address"; import { Badge } from "@/components/ui/badge"; +import { + type EngineAdmin, + useEngineGrantPermissions, + useEngineRevokePermissions, +} from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface AdminsTableProps { instanceUrl: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/engine-admins.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/engine-admins.tsx index 2a5efae9440..f4fcfbc509c 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/engine-admins.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/engine-admins.tsx @@ -1,8 +1,10 @@ "use client"; -import { useEnginePermissions } from "@3rdweb-sdk/react/hooks/useEngine"; +import { Heading } from "chakra/heading"; +import { Link } from "chakra/link"; +import { Text } from "chakra/text"; import type { ThirdwebClient } from "thirdweb"; -import { Heading, Link, Text } from "tw-components"; +import { useEnginePermissions } from "@/hooks/useEngine"; import { AddAdminButton } from "./add-admin-button"; import { AdminsTable } from "./admins-table"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/EngineAlertDialogForm.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/EngineAlertDialogForm.tsx index 394ff8a6e36..f7e2939d160 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/EngineAlertDialogForm.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/EngineAlertDialogForm.tsx @@ -1,9 +1,5 @@ "use client"; -import { - type EngineAlertRule, - EngineNotificationChannelTypeConfig, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import { z } from "zod"; @@ -34,6 +30,10 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { + type EngineAlertRule, + EngineNotificationChannelTypeConfig, +} from "@/hooks/useEngine"; const alertFormSchema = z.object({ subscriptionRoutes: z.array(z.string()), diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/EngineAlertsPage.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/EngineAlertsPage.tsx index 557828c596b..1684f0d2dee 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/EngineAlertsPage.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/EngineAlertsPage.tsx @@ -1,9 +1,6 @@ "use client"; -import { - type EngineInstance, - useEngineAlertRules, -} from "@3rdweb-sdk/react/hooks/useEngine"; +import { type EngineInstance, useEngineAlertRules } from "@/hooks/useEngine"; import { ManageEngineAlertsSection } from "./ManageEngineAlerts"; import { RecentEngineAlertsSection } from "./RecentEngineAlerts"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/ManageEngineAlerts.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/ManageEngineAlerts.stories.tsx index 057e9db5142..58c4316f40a 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/ManageEngineAlerts.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/ManageEngineAlerts.stories.tsx @@ -1,14 +1,14 @@ +import type { Meta, StoryObj } from "@storybook/nextjs"; +import { useMutation } from "@tanstack/react-query"; import type { CreateNotificationChannelInput, EngineNotificationChannel, -} from "@3rdweb-sdk/react/hooks/useEngine"; -import type { Meta, StoryObj } from "@storybook/nextjs"; -import { useMutation } from "@tanstack/react-query"; +} from "@/hooks/useEngine"; import { createEngineAlertRuleStub, createEngineNotificationChannelStub, -} from "stories/stubs"; -import { BadgeContainer } from "stories/utils"; +} from "@/storybook/stubs/engine"; +import { BadgeContainer } from "@/storybook/utils"; import { ManageEngineAlertsSectionUI } from "./ManageEngineAlerts"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/ManageEngineAlerts.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/ManageEngineAlerts.tsx index a8eeda9fe0a..851dd795757 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/ManageEngineAlerts.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/ManageEngineAlerts.tsx @@ -1,12 +1,4 @@ "use client"; -import { - type CreateNotificationChannelInput, - type EngineAlertRule, - type EngineNotificationChannel, - useEngineCreateNotificationChannel, - useEngineDeleteNotificationChannel, - useEngineNotificationChannels, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { type UseMutationResult, useMutation } from "@tanstack/react-query"; import { format } from "date-fns"; import { EllipsisVerticalIcon, PlusIcon } from "lucide-react"; @@ -32,6 +24,14 @@ import { TableRow, } from "@/components/ui/table"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { + type CreateNotificationChannelInput, + type EngineAlertRule, + type EngineNotificationChannel, + useEngineCreateNotificationChannel, + useEngineDeleteNotificationChannel, + useEngineNotificationChannels, +} from "@/hooks/useEngine"; import { EngineAlertDialogForm } from "./EngineAlertDialogForm"; import { EngineDeleteAlertModal } from "./EngineDeleteAlertModal"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/RecentEngineAlerts.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/RecentEngineAlerts.stories.tsx index c8fb497d577..ac325b2e5c1 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/RecentEngineAlerts.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/RecentEngineAlerts.stories.tsx @@ -2,8 +2,8 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { createEngineAlertRuleStub, createEngineAlertStub, -} from "stories/stubs"; -import { BadgeContainer } from "stories/utils"; +} from "@/storybook/stubs/engine"; +import { BadgeContainer } from "@/storybook/utils"; import { RecentEngineAlertsSectionUI } from "./RecentEngineAlerts"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/RecentEngineAlerts.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/RecentEngineAlerts.tsx index 0ad9210d92b..9139c26d0cd 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/RecentEngineAlerts.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/alerts/components/RecentEngineAlerts.tsx @@ -1,10 +1,5 @@ "use client"; -import { - type EngineAlert, - type EngineAlertRule, - useEngineAlerts, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { formatDistance } from "date-fns"; import { useMemo } from "react"; import { Badge, type BadgeProps } from "@/components/ui/badge"; @@ -18,6 +13,11 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; +import { + type EngineAlert, + type EngineAlertRule, + useEngineAlerts, +} from "@/hooks/useEngine"; export function RecentEngineAlertsSection(props: { alertRules: EngineAlertRule[]; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/circle-config.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/circle-config.tsx index fee6876b533..d6bfaa21f40 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/circle-config.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/circle-config.tsx @@ -1,8 +1,3 @@ -import { - type EngineInstance, - type SetWalletConfigInput, - useEngineSetWalletConfig, -} from "@3rdweb-sdk/react/hooks/useEngine"; import Link from "next/link"; import { useId } from "react"; import { useForm } from "react-hook-form"; @@ -12,6 +7,11 @@ import { Button } from "@/components/ui/button"; import { Form } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { + type EngineInstance, + type SetWalletConfigInput, + useEngineSetWalletConfig, +} from "@/hooks/useEngine"; interface CircleConfigProps { instance: EngineInstance; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/cors.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/cors.tsx index 580c8f15f64..16edca08d84 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/cors.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/cors.tsx @@ -1,12 +1,14 @@ -import { - useEngineCorsConfiguration, - useEngineSetCorsConfiguration, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, Textarea } from "@chakra-ui/react"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { useForm } from "react-hook-form"; -import { Button, Heading, Text } from "tw-components"; import { InlineCode } from "@/components/ui/inline-code"; +import { + useEngineCorsConfiguration, + useEngineSetCorsConfiguration, +} from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface EngineCorsConfigProps { instanceUrl: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/engine-configuration.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/engine-configuration.tsx index 0a1e5d385bb..9f292b207de 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/engine-configuration.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/engine-configuration.tsx @@ -1,6 +1,6 @@ "use client"; -import type { EngineInstance } from "@3rdweb-sdk/react/hooks/useEngine"; +import type { EngineInstance } from "@/hooks/useEngine"; import { EngineCorsConfig } from "./cors"; import { EngineWalletConfig } from "./engine-wallet-config"; import { EngineIpAllowlistConfig } from "./ip-allowlist"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/engine-wallet-config.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/engine-wallet-config.tsx index a2a3b60750b..6c1d43f560c 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/engine-wallet-config.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/engine-wallet-config.tsx @@ -1,19 +1,19 @@ -import { - type EngineInstance, - useEngineWalletConfig, - useHasEngineFeature, -} from "@3rdweb-sdk/react/hooks/useEngine"; -import { - EngineBackendWalletOptions, - type EngineBackendWalletType, -} from "lib/engine"; +import { Heading } from "chakra/heading"; import { CircleAlertIcon } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; -import { Heading } from "tw-components"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { TabButtons } from "@/components/ui/tabs"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { + EngineBackendWalletOptions, + type EngineBackendWalletType, +} from "@/constants/engine"; +import { + type EngineInstance, + useEngineWalletConfig, + useHasEngineFeature, +} from "@/hooks/useEngine"; import { cn } from "@/lib/utils"; import { CircleConfig } from "./circle-config"; import { KmsAwsConfig } from "./kms-aws-config"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/ip-allowlist.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/ip-allowlist.tsx index c358c713341..cd4eb30dc52 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/ip-allowlist.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/ip-allowlist.tsx @@ -1,14 +1,16 @@ -import { - useEngineIpAllowlistConfiguration, - useEngineSetIpAllowlistConfiguration, - useHasEngineFeature, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, Textarea } from "@chakra-ui/react"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { isValid } from "ipaddr.js"; import { useForm } from "react-hook-form"; -import { Button, Heading, Text } from "tw-components"; import { InlineCode } from "@/components/ui/inline-code"; +import { + useEngineIpAllowlistConfiguration, + useEngineSetIpAllowlistConfiguration, + useHasEngineFeature, +} from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface EngineIpAllowlistConfigProps { instanceUrl: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/kms-aws-config.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/kms-aws-config.tsx index 60b2e2332f2..d80241991f3 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/kms-aws-config.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/kms-aws-config.tsx @@ -1,11 +1,3 @@ -import { - type EngineInstance, - type SetWalletConfigInput, - useEngineSetWalletConfig, - useEngineWalletConfig, - useHasEngineFeature, -} from "@3rdweb-sdk/react/hooks/useEngine"; -import { useTxNotifications } from "hooks/useTxNotifications"; import Link from "next/link"; import { useId } from "react"; import { useForm } from "react-hook-form"; @@ -14,6 +6,14 @@ import { Button } from "@/components/ui/button"; import { Form, FormDescription } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { + type EngineInstance, + type SetWalletConfigInput, + useEngineSetWalletConfig, + useEngineWalletConfig, + useHasEngineFeature, +} from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface KmsAwsConfigProps { instance: EngineInstance; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/kms-gcp-config.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/kms-gcp-config.tsx index 49627895480..c8c41128876 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/kms-gcp-config.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/kms-gcp-config.tsx @@ -1,11 +1,3 @@ -import { - type EngineInstance, - type SetWalletConfigInput, - useEngineSetWalletConfig, - useEngineWalletConfig, - useHasEngineFeature, -} from "@3rdweb-sdk/react/hooks/useEngine"; -import { useTxNotifications } from "hooks/useTxNotifications"; import Link from "next/link"; import { useId } from "react"; import { useForm } from "react-hook-form"; @@ -15,6 +7,14 @@ import { Form, FormDescription } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { Textarea } from "@/components/ui/textarea"; +import { + type EngineInstance, + type SetWalletConfigInput, + useEngineSetWalletConfig, + useEngineWalletConfig, + useHasEngineFeature, +} from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface KmsGcpConfigProps { instance: EngineInstance; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/system.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/system.tsx index 64705289f15..2616c6c4f62 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/system.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/configuration/components/system.tsx @@ -2,7 +2,7 @@ import { type EngineInstance, useEngineSystemHealth, useEngineSystemMetrics, -} from "@3rdweb-sdk/react/hooks/useEngine"; +} from "@/hooks/useEngine"; interface EngineSystemProps { instance: EngineInstance; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/add-contract-subscription-button.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/add-contract-subscription-button.tsx index 6ffc09084cd..4802a20d763 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/add-contract-subscription-button.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/add-contract-subscription-button.tsx @@ -1,10 +1,5 @@ "use client"; -import { - type AddContractSubscriptionInput, - useEngineAddContractSubscription, -} from "@3rdweb-sdk/react/hooks/useEngine"; -import { useResolveContractAbi } from "@3rdweb-sdk/react/hooks/useResolveContractAbi"; import { Collapse, Flex, @@ -23,22 +18,23 @@ import { type UseDisclosureReturn, useDisclosure, } from "@chakra-ui/react"; -import { useTxNotifications } from "hooks/useTxNotifications"; -import { useV5DashboardChain } from "lib/v5-adapter"; +import { Button } from "chakra/button"; +import { Card } from "chakra/card"; +import { FormErrorMessage, FormHelperText, FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { CirclePlusIcon } from "lucide-react"; import { type Dispatch, type SetStateAction, useMemo, useState } from "react"; import { type UseFormReturn, useForm } from "react-hook-form"; import { getContract, isAddress, type ThirdwebClient } from "thirdweb"; -import { - Button, - Card, - FormErrorMessage, - FormHelperText, - FormLabel, - Text, -} from "tw-components"; import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors"; import { Checkbox, CheckboxWithLabel } from "@/components/ui/checkbox"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; +import { + type AddContractSubscriptionInput, + useEngineAddContractSubscription, +} from "@/hooks/useEngine"; +import { useResolveContractAbi } from "@/hooks/useResolveContractAbi"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface AddContractSubscriptionButtonProps { instanceUrl: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/contract-subscriptions-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/contract-subscriptions-table.tsx index 2e3c4eac8f7..fc0a9c93332 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/contract-subscriptions-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/contract-subscriptions-table.tsx @@ -1,10 +1,5 @@ "use client"; -import { - type EngineContractSubscription, - useEngineRemoveContractSubscription, - useEngineSubscriptionsLastBlock, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, @@ -21,19 +16,27 @@ import { } from "@chakra-ui/react"; import { keepPreviousData, useQuery } from "@tanstack/react-query"; import { createColumnHelper } from "@tanstack/react-table"; -import { ChainIconClient } from "components/icons/ChainIcon"; -import { TWTable } from "components/shared/TWTable"; +import { Button, LinkButton } from "chakra/button"; +import { Card } from "chakra/card"; +import { FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { format } from "date-fns"; -import { useAllChainsData } from "hooks/chains/allChains"; -import { useTxNotifications } from "hooks/useTxNotifications"; -import { useV5DashboardChain } from "lib/v5-adapter"; import { InfoIcon, Trash2Icon } from "lucide-react"; import { useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import { eth_getBlockByNumber, getRpcClient } from "thirdweb"; import { shortenAddress as shortenAddressThrows } from "thirdweb/utils"; -import { Button, Card, FormLabel, LinkButton, Text } from "tw-components"; +import { TWTable } from "@/components/blocks/TWTable"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; +import { + type EngineContractSubscription, + useEngineRemoveContractSubscription, + useEngineSubscriptionsLastBlock, +} from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { ChainIconClient } from "@/icons/ChainIcon"; function shortenAddress(address: string) { if (!address) { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/engine-contract-subscription.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/engine-contract-subscription.tsx index 2e6b7c16f26..3e80cb87799 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/engine-contract-subscription.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/engine-contract-subscription.tsx @@ -1,11 +1,13 @@ "use client"; -import { useEngineContractSubscription } from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, Switch } from "@chakra-ui/react"; +import { FormLabel } from "chakra/form"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; import { useId, useState } from "react"; import type { ThirdwebClient } from "thirdweb"; -import { FormLabel, Heading, Text } from "tw-components"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; +import { useEngineContractSubscription } from "@/hooks/useEngine"; import { AddContractSubscriptionButton } from "./add-contract-subscription-button"; import { ContractSubscriptionTable } from "./contract-subscriptions-table"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/layout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/layout.tsx index 0bca4c4c233..dec85867f99 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/layout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/layout.tsx @@ -1,5 +1,4 @@ -import type { EngineInstance } from "@3rdweb-sdk/react/hooks/useEngine"; -import { ChakraProviderSetup } from "@/components/ChakraProviderSetup"; +import { ChakraProviderSetup } from "chakra/ChakraProviderSetup"; import { Breadcrumb, BreadcrumbItem, @@ -8,8 +7,9 @@ import { BreadcrumbSeparator, } from "@/components/ui/breadcrumb"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; +import type { EngineInstance } from "@/hooks/useEngine"; +import { getAuthToken } from "../../../../../../../../../../@/api/auth-token"; import { getValidAccount } from "../../../../../../../../account/settings/getAccount"; -import { getAuthToken } from "../../../../../../../../api/lib/getAuthToken"; import { loginRedirect } from "../../../../../../../../login/loginRedirect"; import { getEngineInstance } from "../../_utils/getEngineInstance"; import { EngineErrorPage } from "./_components/EngineErrorPage"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/metrics/components/EngineSystemMetrics.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/metrics/components/EngineSystemMetrics.tsx index 9851f29165c..f2a508ffc08 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/metrics/components/EngineSystemMetrics.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/metrics/components/EngineSystemMetrics.tsx @@ -1,14 +1,16 @@ "use client"; +import { Card } from "chakra/card"; +import { Heading } from "chakra/heading"; +import { Text } from "chakra/text"; +import { ChartAreaIcon, InfoIcon } from "lucide-react"; +import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { UnderlineLink } from "@/components/ui/UnderlineLink"; import { type EngineInstance, useEngineQueueMetrics, useEngineSystemMetrics, -} from "@3rdweb-sdk/react/hooks/useEngine"; -import { ChartAreaIcon, InfoIcon } from "lucide-react"; -import { Card, Heading, Text } from "tw-components"; -import { Spinner } from "@/components/ui/Spinner/Spinner"; -import { UnderlineLink } from "@/components/ui/UnderlineLink"; +} from "@/hooks/useEngine"; import { ErrorRate } from "./ErrorRate"; import { Healthcheck } from "./Healthcheck"; import { StatusCodes } from "./StatusCodes"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/metrics/components/Healthcheck.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/metrics/components/Healthcheck.tsx index c8cc905f875..ff2a21a765a 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/metrics/components/Healthcheck.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/metrics/components/Healthcheck.tsx @@ -1,12 +1,9 @@ "use client"; -import { - type EngineInstance, - useEngineSystemHealth, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { PrimaryInfoItem } from "app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/primary-info-item"; import { Skeleton } from "@/components/ui/skeleton"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { type EngineInstance, useEngineSystemHealth } from "@/hooks/useEngine"; export function Healthcheck({ instance }: { instance: EngineInstance }) { const query = useEngineSystemHealth(instance.url, 5_000); diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/backend-wallets-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/backend-wallets-table.tsx index 8bcc7fcce72..965c3fcf0eb 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/backend-wallets-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/backend-wallets-table.tsx @@ -1,11 +1,3 @@ -import { engineKeys } from "@3rdweb-sdk/react"; -import { - type BackendWallet, - useEngineBackendWalletBalance, - useEngineDeleteBackendWallet, - useEngineSendTokens, - useEngineUpdateBackendWallet, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, @@ -25,11 +17,8 @@ import { } from "@chakra-ui/react"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import { type ColumnDef, createColumnHelper } from "@tanstack/react-table"; -import { ChainIconClient } from "components/icons/ChainIcon"; -import { TWTable } from "components/shared/TWTable"; -import { useAllChainsData } from "hooks/chains/allChains"; -import { EngineBackendWalletOptions } from "lib/engine"; -import { useV5DashboardChain } from "lib/v5-adapter"; +import { FormHelperText, FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { DownloadIcon, ExternalLinkIcon, @@ -46,7 +35,7 @@ import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { getAddress, type ThirdwebClient } from "thirdweb"; import { shortenAddress } from "thirdweb/utils"; -import { FormHelperText, FormLabel, Text } from "tw-components"; +import { TWTable } from "@/components/blocks/TWTable"; import { WalletAddress } from "@/components/blocks/wallet-address"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Badge } from "@/components/ui/badge"; @@ -56,6 +45,18 @@ import { FormItem } from "@/components/ui/form"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { Skeleton } from "@/components/ui/skeleton"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { EngineBackendWalletOptions } from "@/constants/engine"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; +import { + type BackendWallet, + useEngineBackendWalletBalance, + useEngineDeleteBackendWallet, + useEngineSendTokens, + useEngineUpdateBackendWallet, +} from "@/hooks/useEngine"; +import { ChainIconClient } from "@/icons/ChainIcon"; +import { engineKeys } from "@/query-keys/cache-keys"; import { prettyPrintCurrency } from "./utils"; interface BackendWalletsTableProps { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/create-backend-wallet-button.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/create-backend-wallet-button.tsx index 2fcfff49e6d..4d3099c5809 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/create-backend-wallet-button.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/create-backend-wallet-button.tsx @@ -1,15 +1,4 @@ -import { - type CreateBackendWalletInput, - type EngineInstance, - useEngineCreateBackendWallet, - useHasEngineFeature, - type WalletConfigResponse, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Dialog } from "@radix-ui/react-dialog"; -import { - EngineBackendWalletOptions, - type EngineBackendWalletType, -} from "lib/engine"; import { CircleAlertIcon, PlusIcon } from "lucide-react"; import Link from "next/link"; import { useId, useState } from "react"; @@ -37,6 +26,17 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { + EngineBackendWalletOptions, + type EngineBackendWalletType, +} from "@/constants/engine"; +import { + type CreateBackendWalletInput, + type EngineInstance, + useEngineCreateBackendWallet, + useHasEngineFeature, + type WalletConfigResponse, +} from "@/hooks/useEngine"; interface CreateBackendWalletButtonProps { instance: EngineInstance; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/engine-overview.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/engine-overview.tsx index 831ef4a5e8f..8c49ff9ce75 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/engine-overview.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/engine-overview.tsx @@ -1,9 +1,4 @@ "use client"; -import { - type EngineInstance, - useEngineBackendWallets, - useEngineWalletConfig, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react"; import { useState } from "react"; import type { ThirdwebClient } from "thirdweb"; @@ -11,6 +6,11 @@ import { useActiveWalletChain } from "thirdweb/react"; import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors"; import { Button } from "@/components/ui/button"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; +import { + type EngineInstance, + useEngineBackendWallets, + useEngineWalletConfig, +} from "@/hooks/useEngine"; import { BackendWalletsTable } from "./backend-wallets-table"; import { CreateBackendWalletButton } from "./create-backend-wallet-button"; import { ImportBackendWalletButton } from "./import-backend-wallet-button"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/import-backend-wallet-button.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/import-backend-wallet-button.tsx index 6e5f527ad58..b9cef604674 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/import-backend-wallet-button.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/import-backend-wallet-button.tsx @@ -1,15 +1,3 @@ -import { - type EngineInstance, - type ImportBackendWalletInput, - useEngineImportBackendWallet, - useHasEngineFeature, - type WalletConfigResponse, -} from "@3rdweb-sdk/react/hooks/useEngine"; -import { useTxNotifications } from "hooks/useTxNotifications"; -import { - EngineBackendWalletOptions, - type EngineBackendWalletType, -} from "lib/engine"; import { CircleAlertIcon, CloudDownloadIcon } from "lucide-react"; import Link from "next/link"; import { useId, useState } from "react"; @@ -42,6 +30,18 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { + EngineBackendWalletOptions, + type EngineBackendWalletType, +} from "@/constants/engine"; +import { + type EngineInstance, + type ImportBackendWalletInput, + useEngineImportBackendWallet, + useHasEngineFeature, + type WalletConfigResponse, +} from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface ImportBackendWalletButtonProps { instance: EngineInstance; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transaction-timeline.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transaction-timeline.tsx index a219182e642..e330744f9d7 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transaction-timeline.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transaction-timeline.tsx @@ -1,4 +1,3 @@ -import type { Transaction } from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, @@ -16,14 +15,17 @@ import { useDisclosure, } from "@chakra-ui/react"; import { useMutation } from "@tanstack/react-query"; +import { Button } from "chakra/button"; +import { FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { format } from "date-fns"; import { CheckIcon } from "lucide-react"; import { useRef } from "react"; import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; -import { Button, FormLabel, Text } from "tw-components"; import { WalletAddress } from "@/components/blocks/wallet-address"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; +import type { Transaction } from "@/hooks/useEngine"; interface TimelineStep { step: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transactions-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transactions-table.tsx index c1ae6c537bb..990dda56759 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transactions-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transactions-table.tsx @@ -1,11 +1,8 @@ -import { - type Transaction, - useEngineTransactions, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Collapse, Divider, useDisclosure } from "@chakra-ui/react"; -import { ChainIconClient } from "components/icons/ChainIcon"; +import { LinkButton } from "chakra/button"; +import { FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { format, formatDistanceToNowStrict } from "date-fns"; -import { useAllChainsData } from "hooks/chains/allChains"; import { ExternalLinkIcon, InfoIcon, @@ -21,10 +18,9 @@ import { useState, } from "react"; import { type ThirdwebClient, toTokens } from "thirdweb"; -import { FormLabel, LinkButton, Text } from "tw-components"; import { ThirdwebBarChart } from "@/components/blocks/charts/bar-chart"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; import { WalletAddress } from "@/components/blocks/wallet-address"; -import { PaginationButtons } from "@/components/pagination-buttons"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; @@ -57,6 +53,9 @@ import { TableRow, } from "@/components/ui/table"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { type Transaction, useEngineTransactions } from "@/hooks/useEngine"; +import { ChainIconClient } from "@/icons/ChainIcon"; import { normalizeTime } from "@/lib/time"; import { TransactionTimeline } from "./transaction-timeline"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/add-relayer-button.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/add-relayer-button.tsx index ff13390baab..7e431c4846c 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/add-relayer-button.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/add-relayer-button.tsx @@ -1,8 +1,3 @@ -import { - type CreateRelayerInput, - useEngineBackendWallets, - useEngineCreateRelayer, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, @@ -19,14 +14,20 @@ import { type UseDisclosureReturn, useDisclosure, } from "@chakra-ui/react"; -import { useAllChainsData } from "hooks/chains/allChains"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { FormHelperText, FormLabel } from "chakra/form"; import { CirclePlusIcon } from "lucide-react"; import { useForm } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; import { isAddress, shortenAddress } from "thirdweb/utils"; -import { Button, FormHelperText, FormLabel } from "tw-components"; import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { + type CreateRelayerInput, + useEngineBackendWallets, + useEngineCreateRelayer, +} from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; interface AddRelayerButtonProps { instanceUrl: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/engine-relayer.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/engine-relayer.tsx index ce428cc79a6..38bc0b9b64b 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/engine-relayer.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/engine-relayer.tsx @@ -1,8 +1,10 @@ "use client"; -import { useEngineRelayer } from "@3rdweb-sdk/react/hooks/useEngine"; +import { Heading } from "chakra/heading"; +import { Link } from "chakra/link"; +import { Text } from "chakra/text"; import type { ThirdwebClient } from "thirdweb"; -import { Heading, Link, Text } from "tw-components"; +import { useEngineRelayer } from "@/hooks/useEngine"; import { AddRelayerButton } from "./add-relayer-button"; import { RelayersTable } from "./relayers-table"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/relayers-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/relayers-table.tsx index 766e19af6ea..9f1677103b0 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/relayers-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/relayers-table.tsx @@ -1,10 +1,3 @@ -import { - type EngineRelayer, - type UpdateRelayerInput, - useEngineBackendWallets, - useEngineRevokeRelayer, - useEngineUpdateRelayer, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, @@ -22,24 +15,26 @@ import { useDisclosure, } from "@chakra-ui/react"; import { createColumnHelper } from "@tanstack/react-table"; -import { ChainIconClient } from "components/icons/ChainIcon"; -import { TWTable } from "components/shared/TWTable"; -import { useAllChainsData } from "hooks/chains/allChains"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button, Legacy_CopyButton, LinkButton } from "chakra/button"; +import { FormHelperText, FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { PencilIcon, Trash2Icon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; import { shortenAddress } from "thirdweb/utils"; -import { - Button, - FormHelperText, - FormLabel, - Legacy_CopyButton, - LinkButton, - Text, -} from "tw-components"; import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors"; +import { TWTable } from "@/components/blocks/TWTable"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { + type EngineRelayer, + type UpdateRelayerInput, + useEngineBackendWallets, + useEngineRevokeRelayer, + useEngineUpdateRelayer, +} from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; +import { ChainIconClient } from "@/icons/ChainIcon"; import { type AddModalInput, parseAddressListRaw } from "./add-relayer-button"; interface RelayersTableProps { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/create-wallet-credential-button.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/create-wallet-credential-button.tsx index 58ad1b7144f..cd7e6abd163 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/create-wallet-credential-button.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/create-wallet-credential-button.tsx @@ -1,8 +1,8 @@ -import { useEngineCreateWalletCredential } from "@3rdweb-sdk/react/hooks/useEngine"; import { PlusIcon } from "lucide-react"; import { useState } from "react"; import { toast } from "sonner"; import { Button } from "@/components/ui/button"; +import { useEngineCreateWalletCredential } from "@/hooks/useEngine"; import { CredentialForm } from "./credential-form"; import type { CredentialFormData } from "./types"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/edit-wallet-credential-button.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/edit-wallet-credential-button.tsx index 56ca40425b6..c96f1205671 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/edit-wallet-credential-button.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/edit-wallet-credential-button.tsx @@ -1,11 +1,11 @@ -import { - useEngineUpdateWalletCredential, - type WalletCredential, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { PencilIcon } from "lucide-react"; import { useState } from "react"; import { toast } from "sonner"; import { Button } from "@/components/ui/button"; +import { + useEngineUpdateWalletCredential, + type WalletCredential, +} from "@/hooks/useEngine"; import { CredentialForm } from "./credential-form"; import type { CredentialUpdateFormData } from "./types"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/wallet-credentials-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/wallet-credentials-table.tsx index 040d4331f5d..423a9312db0 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/wallet-credentials-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/wallet-credentials-table.tsx @@ -1,4 +1,3 @@ -import type { WalletCredential } from "@3rdweb-sdk/react/hooks/useEngine"; import { format } from "date-fns"; import { Badge } from "@/components/ui/badge"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; @@ -12,6 +11,7 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; +import type { WalletCredential } from "@/hooks/useEngine"; import { EditWalletCredentialButton } from "./edit-wallet-credential-button"; interface WalletCredentialsTableProps { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/wallet-credentials.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/wallet-credentials.tsx index 577c9040b8a..ec076d444ee 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/wallet-credentials.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/wallet-credentials/components/wallet-credentials.tsx @@ -1,13 +1,13 @@ "use client"; -import { - useEngineWalletCredentials, - useHasEngineFeature, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { CircleAlertIcon } from "lucide-react"; import Link from "next/link"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { + useEngineWalletCredentials, + useHasEngineFeature, +} from "@/hooks/useEngine"; import { CreateWalletCredentialButton } from "./create-wallet-credential-button"; import { WalletCredentialsTable } from "./wallet-credentials-table"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/add-webhook-button.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/add-webhook-button.tsx index 49c82024a2c..2f95e199259 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/add-webhook-button.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/add-webhook-button.tsx @@ -1,7 +1,3 @@ -import { - type CreateWebhookInput, - useEngineCreateWebhook, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, @@ -16,10 +12,15 @@ import { Select, useDisclosure, } from "@chakra-ui/react"; -import { useTxNotifications } from "hooks/useTxNotifications"; +import { Button } from "chakra/button"; +import { FormLabel } from "chakra/form"; import { CirclePlusIcon } from "lucide-react"; import { useForm } from "react-hook-form"; -import { Button, FormLabel } from "tw-components"; +import { + type CreateWebhookInput, + useEngineCreateWebhook, +} from "@/hooks/useEngine"; +import { useTxNotifications } from "@/hooks/useTxNotifications"; import { beautifyString } from "./webhooks-table"; interface AddWebhookButtonProps { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/engine-webhooks.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/engine-webhooks.tsx index 406e014c802..65719b202d3 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/engine-webhooks.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/engine-webhooks.tsx @@ -1,7 +1,9 @@ "use client"; -import { useEngineWebhooks } from "@3rdweb-sdk/react/hooks/useEngine"; -import { Heading, Link, Text } from "tw-components"; +import { Heading } from "chakra/heading"; +import { Link } from "chakra/link"; +import { Text } from "chakra/text"; +import { useEngineWebhooks } from "@/hooks/useEngine"; import { AddWebhookButton } from "./add-webhook-button"; import { WebhooksTable } from "./webhooks-table"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/webhooks-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/webhooks-table.tsx index b8f0243ebd0..94693a0bcee 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/webhooks-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/webhooks/components/webhooks-table.tsx @@ -1,8 +1,3 @@ -import { - type EngineWebhook, - useEngineDeleteWebhook, - useEngineTestWebhook, -} from "@3rdweb-sdk/react/hooks/useEngine"; import { Flex, FormControl, @@ -18,18 +13,25 @@ import { useDisclosure, } from "@chakra-ui/react"; import { createColumnHelper } from "@tanstack/react-table"; -import { TWTable } from "components/shared/TWTable"; +import { Card } from "chakra/card"; +import { FormLabel } from "chakra/form"; +import { Text } from "chakra/text"; import { format, formatDistanceToNowStrict } from "date-fns"; import { MailQuestionIcon, TrashIcon } from "lucide-react"; import { useState } from "react"; import { toast } from "sonner"; -import { Card, FormLabel, Text } from "tw-components"; -import { shortenString } from "utils/usedapp-external"; +import { TWTable } from "@/components/blocks/TWTable"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { FormItem } from "@/components/ui/form"; import { Spinner } from "@/components/ui/Spinner/Spinner"; +import { + type EngineWebhook, + useEngineDeleteWebhook, + useEngineTestWebhook, +} from "@/hooks/useEngine"; +import { shortenString } from "@/utils/usedapp-external"; export function beautifyString(str: string): string { return str diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstance.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstance.ts index 4f1197e4365..9f212a5f33b 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstance.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstance.ts @@ -1,8 +1,8 @@ -import type { EngineInstance } from "@3rdweb-sdk/react/hooks/useEngine"; import { NEXT_PUBLIC_DEMO_ENGINE_URL, NEXT_PUBLIC_THIRDWEB_API_HOST, } from "@/constants/public-envs"; +import type { EngineInstance } from "@/hooks/useEngine"; export async function getEngineInstance(params: { teamIdOrSlug: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstancePageMeta.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstancePageMeta.ts index 607e4176168..46179d5dcc6 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstancePageMeta.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstancePageMeta.ts @@ -1,8 +1,8 @@ import { notFound } from "next/navigation"; import { getTeamBySlug } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { getAuthToken } from "../../../../../../../../../@/api/auth-token"; import { getValidAccount } from "../../../../../../../account/settings/getAccount"; -import { getAuthToken } from "../../../../../../../api/lib/getAuthToken"; import { loginRedirect } from "../../../../../../../login/loginRedirect"; import { getEngineInstance } from "./getEngineInstance"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstances.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstances.ts index 8258e289b6a..292e2ac51c7 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstances.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstances.ts @@ -1,5 +1,5 @@ -import type { EngineInstance } from "@3rdweb-sdk/react/hooks/useEngine"; import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs"; +import type { EngineInstance } from "@/hooks/useEngine"; export async function getEngineInstances(params: { authToken: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/page.tsx index b0b5e8bab33..be4cc7238ac 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/page.tsx @@ -1,6 +1,6 @@ import { redirect } from "next/navigation"; import { getProject } from "@/api/projects"; -import { getAuthToken } from "../../../../../api/lib/getAuthToken"; +import { getAuthToken } from "../../../../../../../@/api/auth-token"; import { getEngineInstances } from "./dedicated/_utils/getEngineInstances"; export default async function TransactionsAnalyticsPage(props: { 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 adbbd605cfa..ad52ca60249 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,18 +1,15 @@ import Link from "next/link"; import { redirect } from "next/navigation"; +import { getAuthToken, getAuthTokenWalletAddress } from "@/api/auth-token"; import { getProject, getProjects, type Project } from "@/api/projects"; import { getTeamBySlug, getTeams } from "@/api/team"; +import { CustomChatButton } from "@/components/chat/CustomChatButton"; import { Button } from "@/components/ui/button"; import { SidebarProvider } from "@/components/ui/sidebar"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { CustomChatButton } from "../../../../../../components/CustomChat/CustomChatButton"; -import { AnnouncementBanner } from "../../../../../../components/notices/AnnouncementBanner"; +import { AnnouncementBanner } from "../../../../../../@/components/misc/AnnouncementBanner"; import { siwaExamplePrompts } from "../../../../(dashboard)/support/definitions"; import { getValidAccount } from "../../../../account/settings/getAccount"; -import { - getAuthToken, - getAuthTokenWalletAddress, -} from "../../../../api/lib/getAuthToken"; import { TeamHeaderLoggedIn } from "../../../components/TeamHeader/team-header-logged-in.client"; import { ProjectSidebarLayout } from "./components/ProjectSidebarLayout"; import { SaveLastUsedProject } from "./components/SaveLastUsedProject"; 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 a6b8a44b8ae..11675518300 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 @@ -2,12 +2,6 @@ import { EmptyStateCard, EmptyStateContent, } from "app/(app)/team/components/Analytics/EmptyStateCard"; -import { - type DurationId, - getLastNDaysRange, - type Range, -} from "components/analytics/date-range-selector"; -import { RangeSelector } from "components/analytics/range-selector"; import { redirect } from "next/navigation"; import { Suspense } from "react"; import type { ThirdwebClient } from "thirdweb"; @@ -17,13 +11,6 @@ import { getChainMetadata, } from "thirdweb/chains"; import { getWalletInfo, type WalletId } from "thirdweb/wallets"; -import type { - InAppWalletStats, - UniversalBridgeStats, - UserOpStats, - WalletStats, - WalletUserStats, -} from "types/analytics"; import { getInAppWalletUsage, getUniversalBridgeUsage, @@ -33,10 +20,23 @@ import { isProjectActive, } from "@/api/analytics"; import { getProject, type Project } from "@/api/projects"; +import { + type DurationId, + getLastNDaysRange, + type Range, +} from "@/components/analytics/date-range-selector"; +import { RangeSelector } from "@/components/analytics/range-selector"; import { GenericLoadingPage } from "@/components/blocks/skeletons/GenericLoadingPage"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { LoadingChartState } from "../../../../../../components/analytics/empty-chart-state"; -import { getAuthToken } from "../../../../api/lib/getAuthToken"; +import type { + InAppWalletStats, + UniversalBridgeStats, + UserOpStats, + WalletStats, + WalletUserStats, +} from "@/types/analytics"; +import { getAuthToken } from "../../../../../../@/api/auth-token"; +import { LoadingChartState } from "../../../../../../@/components/analytics/empty-chart-state"; import { loginRedirect } from "../../../../login/loginRedirect"; import { CombinedBarChartCard } from "../../../components/Analytics/CombinedBarChartCard"; import { PieChartCard } from "../../../components/Analytics/PieChartCard"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.stories.tsx index 26ff6e747ab..ee6a3ea0c6c 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { projectStub, teamStub } from "stories/stubs"; -import { storybookThirdwebClient } from "stories/utils"; +import { projectStub, teamStub } from "@/storybook/stubs"; +import { storybookThirdwebClient } from "@/storybook/utils"; import { ProjectGeneralSettingsPageUI } from "./ProjectGeneralSettingsPage"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.tsx index 37d4ea5b6e1..5446c232d2f 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.tsx @@ -1,10 +1,4 @@ "use client"; -import type { RotateSecretKeyAPIReturnType } from "@3rdweb-sdk/react/hooks/useApi"; -import { - deleteProjectClient, - rotateSecretKeyClient, - updateProjectClient, -} from "@3rdweb-sdk/react/hooks/useApi"; import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; import type { ProjectService } from "@thirdweb-dev/service-utils"; @@ -13,12 +7,6 @@ import { SERVICES, type ServiceName, } from "@thirdweb-dev/service-utils"; -import { - HIDDEN_SERVICES, - projectDomainsSchema, - projectNameSchema, -} from "components/settings/ApiKeys/validations"; -import { FileInput } from "components/shared/FileInput"; import { format } from "date-fns"; import { CircleAlertIcon, @@ -37,15 +25,13 @@ import { import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; import { upload } from "thirdweb/storage"; -import { RE_BUNDLE_ID } from "utils/regex"; -import { joinWithComma, toArrFromList } from "utils/string"; -import { validStrList } from "utils/validations"; import { z } from "zod"; import { apiServerProxy } from "@/actions/proxies"; import type { Project } from "@/api/projects"; import type { Team } from "@/api/team"; -import { GradientAvatar } from "@/components/blocks/Avatars/GradientAvatar"; +import { GradientAvatar } from "@/components/blocks/avatar/gradient-avatar"; import { DangerSettingCard } from "@/components/blocks/DangerSettingCard"; +import { FileInput } from "@/components/blocks/FileInput"; import { SettingsCard } from "@/components/blocks/SettingsCard"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; @@ -73,9 +59,23 @@ import { import { Switch } from "@/components/ui/switch"; import { Textarea } from "@/components/ui/textarea"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import type { RotateSecretKeyAPIReturnType } from "@/hooks/useApi"; +import { + deleteProjectClient, + rotateSecretKeyClient, + updateProjectClient, +} from "@/hooks/useApi"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; import { cn } from "@/lib/utils"; +import { + HIDDEN_SERVICES, + projectDomainsSchema, + projectNameSchema, +} from "@/schema/validations"; +import { RE_BUNDLE_ID } from "@/utils/regex"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; +import { joinWithComma, toArrFromList } from "@/utils/string"; +import { validStrList } from "@/utils/validations"; // TODO: instead of single submit handler, move the submit to each section diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/page.tsx index 73972ab3d6c..4302bc90eda 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/page.tsx @@ -3,8 +3,8 @@ import { getProject } from "@/api/projects"; import { getTeams } from "@/api/team"; import { getMemberByAccountId } from "@/api/team-members"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { getAuthToken } from "../../../../../../../@/api/auth-token"; import { getValidAccount } from "../../../../../account/settings/getAccount"; -import { getAuthToken } from "../../../../../api/lib/getAuthToken"; import { loginRedirect } from "../../../../../login/loginRedirect"; import { ProjectGeneralSettingsPage } from "./ProjectGeneralSettingsPage"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/cards.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/cards.tsx index d34594bdb83..cd7257697f0 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/cards.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/cards.tsx @@ -1,6 +1,5 @@ "use client"; -import { ImportModal } from "components/contract-components/import-contract/modal"; import { ArrowDownToLineIcon, CoinsIcon, ImagesIcon } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; @@ -10,6 +9,7 @@ import { reportAssetImportStarted, reportAssetImportSuccessful, } from "@/analytics/report"; +import { ImportModal } from "@/components/contracts/import-contract/modal"; import { cn } from "@/lib/utils"; export function Cards(props: { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/_common/chain-overview.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/_common/chain-overview.tsx index 9686de9a5a9..714a1c94434 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/_common/chain-overview.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/_common/chain-overview.tsx @@ -1,6 +1,6 @@ -import { ChainIconClient } from "components/icons/ChainIcon"; -import { useAllChainsData } from "hooks/chains/allChains"; import type { ThirdwebClient } from "thirdweb/dist/types/client/client"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { ChainIconClient } from "@/icons/ChainIcon"; export function ChainOverview(props: { chainId: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/collection-info/nft-collection-info-fieldset.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/collection-info/nft-collection-info-fieldset.tsx index 972abd256fd..2399888a1b8 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/collection-info/nft-collection-info-fieldset.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/collection-info/nft-collection-info-fieldset.tsx @@ -1,10 +1,10 @@ "use client"; -import { FileInput } from "components/shared/FileInput"; import { useId } from "react"; import type { UseFormReturn } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; import { ClientOnly } from "@/components/blocks/client-only"; +import { FileInput } from "@/components/blocks/FileInput"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors"; import { Form } from "@/components/ui/form"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/create-nft-page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/create-nft-page.tsx index c15bceaa91f..ece2365437d 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/create-nft-page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/create-nft-page.tsx @@ -20,13 +20,13 @@ import { } from "thirdweb/extensions/erc1155"; import { useActiveAccount } from "thirdweb/react"; import { maxUint256 } from "thirdweb/utils"; -import { parseError } from "utils/errorParser"; import { revalidatePathAction } from "@/actions/revalidate"; import { reportAssetCreationFailed, reportContractDeployed, } from "@/analytics/report"; -import { useAddContractToProject } from "../../../hooks/project-contracts"; +import { useAddContractToProject } from "@/hooks/project-contracts"; +import { parseError } from "@/utils/errorParser"; import type { CreateNFTCollectionAllValues } from "./_common/form"; import { CreateNFTPageUI } from "./create-nft-page-ui"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/launch/launch-nft.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/launch/launch-nft.tsx index eb29022b01e..40acfb50e38 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/launch/launch-nft.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/launch/launch-nft.tsx @@ -1,6 +1,5 @@ "use client"; -import { TransactionButton } from "components/buttons/TransactionButton"; import { ArrowRightIcon, ArrowUpFromLineIcon, @@ -10,11 +9,11 @@ import Link from "next/link"; import { useMemo, useRef, useState } from "react"; import { defineChain, type ThirdwebClient } from "thirdweb"; import { TokenProvider, TokenSymbol, useActiveWallet } from "thirdweb/react"; -import { parseError } from "utils/errorParser"; import { reportAssetCreationFailed } from "@/analytics/report"; import type { MultiStepState } from "@/components/blocks/multi-step-status/multi-step-status"; import { MultiStepStatus } from "@/components/blocks/multi-step-status/multi-step-status"; import { WalletAddress } from "@/components/blocks/wallet-address"; +import { TransactionButton } from "@/components/tx-button"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { @@ -25,6 +24,7 @@ import { DialogTitle, } from "@/components/ui/dialog"; import { Skeleton } from "@/components/ui/skeleton"; +import { parseError } from "@/utils/errorParser"; import { ChainOverview } from "../../_common/chain-overview"; import { FilePreview } from "../../_common/file-preview"; import { StepCard } from "../../_common/step-card"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/page.tsx index 4880b9039e1..d79e1f365ff 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/page.tsx @@ -1,9 +1,6 @@ -import { - getAuthToken, - getAuthTokenWalletAddress, -} from "@app/api/lib/getAuthToken"; import { loginRedirect } from "@app/login/loginRedirect"; import { redirect } from "next/navigation"; +import { getAuthToken, getAuthTokenWalletAddress } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/sales/sales-settings.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/sales/sales-settings.tsx index 07358dcf99a..9115bcdd083 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/sales/sales-settings.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/sales/sales-settings.tsx @@ -1,9 +1,9 @@ -import { BasisPointsInput } from "components/inputs/BasisPointsInput"; import type { UseFormReturn } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; +import { BasisPointsInput } from "@/components/blocks/BasisPointsInput"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; import { Form } from "@/components/ui/form"; -import { SolidityInput } from "../../../../../../../../../../contract-ui/components/solidity-inputs"; +import { SolidityInput } from "../../../../../../../../../../@/components/solidity-inputs"; import { StepCard } from "../../_common/step-card"; import type { NFTSalesSettingsFormValues } from "../_common/form"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/batch-upload/batch-upload-nfts.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/batch-upload/batch-upload-nfts.tsx index 4de31adaec5..0bcaa3b0a06 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/batch-upload/batch-upload-nfts.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/batch-upload/batch-upload-nfts.tsx @@ -14,8 +14,8 @@ import { } from "thirdweb"; import { MediaRenderer } from "thirdweb/react"; import { DropZone } from "@/components/blocks/drop-zone/drop-zone"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; import { TokenSelector } from "@/components/blocks/TokenSelector"; -import { PaginationButtons } from "@/components/pagination-buttons"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { DynamicHeight } from "@/components/ui/DynamicHeight"; @@ -31,7 +31,7 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; import { FilePreview } from "../../../_common/file-preview"; import { nftWithPriceSchema } from "../schema"; import { BatchUploadInstructions } from "./batch-upload-instructions"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/batch-upload/process-files.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/batch-upload/process-files.ts index f157a85d814..a112bde4320 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/batch-upload/process-files.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/batch-upload/process-files.ts @@ -5,7 +5,7 @@ import z from "zod"; import { csvMimeTypes, jsonMimeTypes, -} from "../../../../../../../../../../../utils/batch"; +} from "../../../../../../../../../../../@/utils/batch"; const transformHeader = (h: string) => { const headersToTransform = [ diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/single-upload/single-upload-nft.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/single-upload/single-upload-nft.tsx index acb2032e0cd..eb766bcaaf9 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/single-upload/single-upload-nft.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/single-upload/single-upload-nft.tsx @@ -1,11 +1,11 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; -import { FileInput } from "components/shared/FileInput"; import { ArrowLeftIcon, ArrowRightIcon, AsteriskIcon } from "lucide-react"; import { useId } from "react"; import { useForm } from "react-hook-form"; import type { ThirdwebClient } from "thirdweb"; +import { FileInput } from "@/components/blocks/FileInput"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; import { TokenSelector } from "@/components/blocks/TokenSelector"; import { Badge } from "@/components/ui/badge"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/upload-nfts.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/upload-nfts.stories.tsx index 3434451e573..c9c60ae5064 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/upload-nfts.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/upload-nfts/upload-nfts.stories.tsx @@ -1,8 +1,8 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { useState } from "react"; -import { storybookThirdwebClient } from "stories/utils"; import { getAddress, NATIVE_TOKEN_ADDRESS } from "thirdweb"; import { ThirdwebProvider } from "thirdweb/react"; +import { storybookThirdwebClient } from "@/storybook/utils"; import type { NFTMetadataWithPrice } from "./batch-upload/process-files"; import { type NFTData, UploadNFTsFieldset } from "./upload-nfts"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page-impl.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page-impl.tsx index f99523f27f4..28eee054f9d 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page-impl.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page-impl.tsx @@ -1,10 +1,4 @@ "use client"; -import { - DEFAULT_FEE_BPS_NEW, - DEFAULT_FEE_RECIPIENT, -} from "constants/addresses"; -import { useAllChainsData } from "hooks/chains/allChains"; -import { defineDashboardChain } from "lib/defineDashboardChain"; import { useRef } from "react"; import { toast } from "sonner"; import { @@ -24,14 +18,20 @@ import { transferBatch, } from "thirdweb/extensions/erc20"; import { useActiveAccount } from "thirdweb/react"; -import { parseError } from "utils/errorParser"; -import { pollWithTimeout } from "utils/pollWithTimeout"; import { revalidatePathAction } from "@/actions/revalidate"; import { reportAssetCreationFailed, reportContractDeployed, } from "@/analytics/report"; -import { useAddContractToProject } from "../../../hooks/project-contracts"; +import { + DEFAULT_FEE_BPS_NEW, + DEFAULT_FEE_RECIPIENT, +} from "@/constants/addresses"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { useAddContractToProject } from "@/hooks/project-contracts"; +import { defineDashboardChain } from "@/lib/defineDashboardChain"; +import { parseError } from "@/utils/errorParser"; +import { pollWithTimeout } from "@/utils/pollWithTimeout"; import type { CreateAssetFormValues } from "./_common/form"; import { CreateTokenAssetPageUI } from "./create-token-page.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page.stories.tsx index 5e50ad4e542..185efd02438 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { storybookThirdwebClient } from "stories/utils"; import { ConnectButton, ThirdwebProvider } from "thirdweb/react"; +import { storybookThirdwebClient } from "@/storybook/utils"; import { CreateTokenAssetPageUI } from "./create-token-page.client"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/distribution/token-airdrop.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/distribution/token-airdrop.tsx index 86d77ba4c77..dbd83f8253c 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/distribution/token-airdrop.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/distribution/token-airdrop.tsx @@ -1,7 +1,6 @@ /* eslint-disable @next/next/no-img-element */ "use client"; -import { useCsvUpload } from "hooks/useCsvUpload"; import { ArrowRightIcon, ArrowUpFromLineIcon, @@ -36,6 +35,7 @@ import { TableRow, } from "@/components/ui/table"; import { Textarea } from "@/components/ui/textarea"; +import { useCsvUpload } from "@/hooks/useCsvUpload"; import { cn } from "@/lib/utils"; import { DownloadFileButton } from "../../_common/download-file-button"; import type { TokenDistributionForm } from "../_common/form"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/launch/launch-token.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/launch/launch-token.tsx index 703713fd0ef..ef0ad460c20 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/launch/launch-token.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/launch/launch-token.tsx @@ -1,5 +1,4 @@ "use client"; -import { TransactionButton } from "components/buttons/TransactionButton"; import { ArrowRightIcon, ArrowUpFromLineIcon, @@ -9,7 +8,6 @@ import Link from "next/link"; import { useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import { useActiveWallet } from "thirdweb/react"; -import { parseError } from "utils/errorParser"; import { reportAssetCreationFailed, reportAssetCreationSuccessful, @@ -18,6 +16,7 @@ import { type MultiStepState, MultiStepStatus, } from "@/components/blocks/multi-step-status/multi-step-status"; +import { TransactionButton } from "@/components/tx-button"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -26,6 +25,7 @@ import { DialogHeader, DialogTitle, } from "@/components/ui/dialog"; +import { parseError } from "@/utils/errorParser"; import { ChainOverview } from "../../_common/chain-overview"; import { FilePreview } from "../../_common/file-preview"; import { StepCard } from "../../_common/step-card"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/page.tsx index c2b36a810e4..2e4b938550e 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/page.tsx @@ -1,9 +1,6 @@ -import { - getAuthToken, - getAuthTokenWalletAddress, -} from "@app/api/lib/getAuthToken"; import { loginRedirect } from "@app/login/loginRedirect"; import { redirect } from "next/navigation"; +import { getAuthToken, getAuthTokenWalletAddress } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/token-info/token-info-fieldset.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/token-info/token-info-fieldset.tsx index a9caea446c5..7a0d4655c4f 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/token-info/token-info-fieldset.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/token-info/token-info-fieldset.tsx @@ -1,9 +1,9 @@ "use client"; -import { FileInput } from "components/shared/FileInput"; import { useId } from "react"; import type { ThirdwebClient } from "thirdweb"; import { ClientOnly } from "@/components/blocks/client-only"; +import { FileInput } from "@/components/blocks/FileInput"; import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors"; import { Form } from "@/components/ui/form"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/page.tsx index 73603bd4427..0b55bb6c333 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/page.tsx @@ -1,14 +1,14 @@ import { redirect } from "next/navigation"; import { Suspense } from "react"; import type { ThirdwebClient } from "thirdweb"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; import { ClientOnly } from "@/components/blocks/client-only"; import { GenericLoadingPage } from "@/components/blocks/skeletons/GenericLoadingPage"; +import { ContractTable } from "@/components/contract-components/tables/contract-table"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { ContractTable } from "../../../../../../../components/contract-components/tables/contract-table"; import { getSortedDeployedContracts } from "../../../../../account/contracts/_components/getSortedDeployedContracts"; -import { getAuthToken } from "../../../../../api/lib/getAuthToken"; import { loginRedirect } from "../../../../../login/loginRedirect"; import { Cards } from "./cards"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/filter.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/filter.tsx index f99b79930bf..93f686df280 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/filter.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/filter.tsx @@ -1,11 +1,11 @@ "use client"; -import { DateRangeSelector } from "components/analytics/date-range-selector"; -import { IntervalSelector } from "components/analytics/interval-selector"; import { useResponsiveSearchParams, useSetResponsiveSearchParams, } from "responsive-rsc"; +import { DateRangeSelector } from "@/components/analytics/date-range-selector"; +import { IntervalSelector } from "@/components/analytics/interval-selector"; import { normalizeTimeISOString } from "@/lib/time"; import { getTxAnalyticsFiltersFromSearchParams } from "../lib/utils"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/ftux.client.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/ftux.client.tsx index 90c2e866fa1..53235fb7834 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/ftux.client.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/ftux.client.tsx @@ -1,9 +1,9 @@ "use client"; -import { type Step, StepsCard } from "components/dashboard/StepsCard"; import Link from "next/link"; import { useMemo, useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import type { Project } from "@/api/projects"; +import { type Step, StepsCard } from "@/components/blocks/StepsCard"; import { Button } from "../../../../../../../../@/components/ui/button"; import { CreateVaultAccountButton } from "../../vault/components/create-vault-account.client"; import CreateServerWallet from "../server-wallets/components/create-server-wallet.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/send-test-tx.client.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/send-test-tx.client.tsx index 1bfa896da23..a5434cd227b 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/send-test-tx.client.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/send-test-tx.client.tsx @@ -1,7 +1,6 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation, useQueryClient } from "@tanstack/react-query"; -import { useAllChainsData } from "hooks/chains/allChains"; import { Loader2Icon, LockIcon } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; @@ -21,6 +20,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { useAllChainsData } from "@/hooks/chains/allChains"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import type { Wallet } from "../server-wallets/wallet-table/types"; import { SmartAccountCell } from "../server-wallets/wallet-table/wallet-table-ui.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/summary.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/summary.tsx index 725c6119cf2..811036ab06f 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/summary.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/summary.tsx @@ -1,6 +1,6 @@ -import { StatCard } from "components/analytics/stat"; // Assuming correct path import { ActivityIcon, CoinsIcon } from "lucide-react"; import { toEther } from "thirdweb/utils"; +import { StatCard } from "@/components/analytics/stat"; // Assuming correct path import type { TransactionSummaryData } from "../lib/analytics"; // Renders the UI based on fetched data or pending state diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/tx-chart/tx-chart-ui.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/tx-chart/tx-chart-ui.tsx index 02af55f0887..c8e0c68f313 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/tx-chart/tx-chart-ui.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/tx-chart/tx-chart-ui.tsx @@ -1,17 +1,17 @@ "use client"; import { format } from "date-fns"; -import { useAllChainsData } from "hooks/chains/allChains"; -import { formatTickerNumber } from "lib/format-utils"; import Link from "next/link"; import { useMemo } from "react"; -import type { TransactionStats } from "types/analytics"; import type { Project } from "@/api/projects"; import { ThirdwebBarChart } from "@/components/blocks/charts/bar-chart"; import { ExportToCSVButton } from "@/components/blocks/ExportToCSVButton"; import { Button } from "@/components/ui/button"; import type { ChartConfig } from "@/components/ui/chart"; +import { useAllChainsData } from "@/hooks/chains/allChains"; import { useDashboardRouter } from "@/lib/DashboardRouter"; +import type { TransactionStats } from "@/types/analytics"; +import { formatTickerNumber } from "@/utils/format-utils"; import type { Wallet } from "../../server-wallets/wallet-table/types"; type ChartData = Record & { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/tx-table/tx-table-ui.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/tx-table/tx-table-ui.tsx index df80b7092f3..a373463c99d 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/tx-table/tx-table-ui.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/tx-table/tx-table-ui.tsx @@ -1,16 +1,14 @@ "use client"; import { keepPreviousData, useQuery } from "@tanstack/react-query"; -import { ChainIconClient } from "components/icons/ChainIcon"; import { format, formatDistanceToNowStrict } from "date-fns"; -import { useAllChainsData } from "hooks/chains/allChains"; import { ExternalLinkIcon, InfoIcon } from "lucide-react"; import Link from "next/link"; import { useId, useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import type { Project } from "@/api/projects"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; import { WalletAddress } from "@/components/blocks/wallet-address"; -import { PaginationButtons } from "@/components/pagination-buttons"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; @@ -36,6 +34,8 @@ import { TableRow, } from "@/components/ui/table"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { ChainIconClient } from "@/icons/ChainIcon"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import type { Wallet } from "../../server-wallets/wallet-table/types"; import type { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/lib/analytics.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/lib/analytics.ts index e87721cff4e..de83a7a8dcb 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/lib/analytics.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/lib/analytics.ts @@ -1,6 +1,6 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; -import type { TransactionStats } from "types/analytics"; +import { getAuthToken } from "@/api/auth-token"; import { NEXT_PUBLIC_ENGINE_CLOUD_URL } from "@/constants/public-envs"; +import type { TransactionStats } from "@/types/analytics"; import type { Transaction, TransactionsResponse, diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/lib/vault.client.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/lib/vault.client.ts index 0769cfb8df9..c740c125ab0 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/lib/vault.client.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/lib/vault.client.ts @@ -1,6 +1,5 @@ "use client"; -import { updateProjectClient } from "@3rdweb-sdk/react/hooks/useApi"; import { createAccessToken, createVaultClient, @@ -8,6 +7,7 @@ import { } from "@thirdweb-dev/vault-sdk"; import type { Project } from "@/api/projects"; import { NEXT_PUBLIC_THIRDWEB_VAULT_URL } from "@/constants/public-envs"; +import { updateProjectClient } from "@/hooks/useApi"; const SERVER_WALLET_ACCESS_TOKEN_PURPOSE = "Access Token for All Server Wallets"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/page.tsx index 3ecafefe821..b146cf23929 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/page.tsx @@ -1,6 +1,6 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { createVaultClient, listEoas } from "@thirdweb-dev/vault-sdk"; import { notFound, redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { NEXT_PUBLIC_THIRDWEB_VAULT_URL } from "@/constants/public-envs"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/page.tsx index 31043a018b1..bde2542bd4f 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/page.tsx @@ -1,6 +1,6 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { createVaultClient, listEoas } from "@thirdweb-dev/vault-sdk"; import { notFound } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { NEXT_PUBLIC_THIRDWEB_VAULT_URL } from "@/constants/public-envs"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx index 420aba0ab76..aadfb8e6950 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx @@ -2,7 +2,6 @@ import { useQuery } from "@tanstack/react-query"; import { format, formatDistanceToNowStrict } from "date-fns"; -import { useV5DashboardChain } from "lib/v5-adapter"; import { SendIcon } from "lucide-react"; import Link from "next/link"; import { useId, useState } from "react"; @@ -35,6 +34,7 @@ import { TableRow, } from "@/components/ui/table"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; import { useDashboardRouter } from "@/lib/DashboardRouter"; import CreateServerWallet from "../components/create-server-wallet.client"; import type { Wallet } from "./types"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/tx/[id]/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/tx/[id]/page.tsx index 53558f2b06c..957e8de6642 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/tx/[id]/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/tx/[id]/page.tsx @@ -1,6 +1,6 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { loginRedirect } from "@app/login/loginRedirect"; import { notFound, redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; import { getSingleTransaction } from "../../lib/analytics"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/tx/[id]/transaction-details-ui.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/tx/[id]/transaction-details-ui.tsx index be6060bf732..951be2deb08 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/tx/[id]/transaction-details-ui.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/tx/[id]/transaction-details-ui.tsx @@ -1,8 +1,6 @@ "use client"; -import { ChainIconClient } from "components/icons/ChainIcon"; import { format, formatDistanceToNowStrict } from "date-fns"; -import { useAllChainsData } from "hooks/chains/allChains"; import { ExternalLinkIcon, InfoIcon } from "lucide-react"; import Link from "next/link"; import { type ThirdwebClient, toEther } from "thirdweb"; @@ -14,6 +12,8 @@ import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { CodeClient } from "@/components/ui/code/code.client"; import { ToolTipLabel } from "@/components/ui/tooltip"; +import { useAllChainsData } from "@/hooks/chains/allChains"; +import { ChainIconClient } from "@/icons/ChainIcon"; import { statusDetails } from "../../analytics/tx-table/tx-table-ui"; import type { Transaction } from "../../analytics/tx-table/types"; diff --git a/apps/dashboard/src/components/pay/PayAnalytics/PayAnalytics.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayAnalytics.tsx similarity index 89% rename from apps/dashboard/src/components/pay/PayAnalytics/PayAnalytics.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayAnalytics.tsx index 76d7b9aab22..84ce0ee17a6 100644 --- a/apps/dashboard/src/components/pay/PayAnalytics/PayAnalytics.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayAnalytics.tsx @@ -3,17 +3,17 @@ import { getUniversalBridgeUsage, getUniversalBridgeWalletUsage, } from "@/api/analytics"; +import type { Range } from "@/components/analytics/date-range-selector"; import { CodeServer } from "@/components/ui/code/code.server"; -import type { Range } from "../../analytics/date-range-selector"; import { apiCode, embedCode, sdkCode } from "./code-examples"; -import { PayCustomersTable } from "./components/PayCustomersTable"; -import { PaymentHistory } from "./components/PaymentHistory"; -import { PaymentsSuccessRate } from "./components/PaymentsSuccessRate"; -import { PayNewCustomers } from "./components/PayNewCustomers"; -import { Payouts } from "./components/Payouts"; -import { TotalPayVolume } from "./components/TotalPayVolume"; -import { TotalVolumePieChart } from "./components/TotalVolumePieChart"; +import { PayCustomersTable } from "./PayCustomersTable"; import { PayEmbedFTUX } from "./PayEmbedFTUX"; +import { PaymentHistory } from "./PaymentHistory"; +import { PaymentsSuccessRate } from "./PaymentsSuccessRate"; +import { PayNewCustomers } from "./PayNewCustomers"; +import { Payouts } from "./Payouts"; +import { TotalPayVolume } from "./TotalPayVolume"; +import { TotalVolumePieChart } from "./TotalVolumePieChart"; export async function PayAnalytics(props: { projectClientId: string; diff --git a/apps/dashboard/src/components/pay/PayAnalytics/components/PayAnalyticsFilter.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayAnalyticsFilter.tsx similarity index 94% rename from apps/dashboard/src/components/pay/PayAnalytics/components/PayAnalyticsFilter.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayAnalyticsFilter.tsx index 718bf2d8aea..496474b7b0e 100644 --- a/apps/dashboard/src/components/pay/PayAnalytics/components/PayAnalyticsFilter.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayAnalyticsFilter.tsx @@ -1,17 +1,17 @@ "use client"; import { useQuery } from "@tanstack/react-query"; -import { - DateRangeSelector, - type DurationId, -} from "components/analytics/date-range-selector"; -import { IntervalSelector } from "components/analytics/interval-selector"; -import { getUniversalBridgeFiltersFromSearchParams } from "lib/time"; import { useResponsiveSearchParams, useSetResponsiveSearchParams, } from "responsive-rsc"; +import { + DateRangeSelector, + type DurationId, +} from "@/components/analytics/date-range-selector"; +import { IntervalSelector } from "@/components/analytics/interval-selector"; import { normalizeTimeISOString } from "@/lib/time"; +import { getUniversalBridgeFiltersFromSearchParams } from "./time"; const STORAGE_KEY = "thirdweb:ub-analytics-range"; diff --git a/apps/dashboard/src/components/pay/PayAnalytics/components/PayCustomersTable.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayCustomersTable.tsx similarity index 97% rename from apps/dashboard/src/components/pay/PayAnalytics/components/PayCustomersTable.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayCustomersTable.tsx index 18de5bf05fd..8bdfd222835 100644 --- a/apps/dashboard/src/components/pay/PayAnalytics/components/PayCustomersTable.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayCustomersTable.tsx @@ -1,12 +1,12 @@ "use client"; import { useMemo } from "react"; import type { ThirdwebClient } from "thirdweb"; -import type { UniversalBridgeWalletStats } from "types/analytics"; import { ExportToCSVButton } from "@/components/blocks/ExportToCSVButton"; import { WalletAddress } from "@/components/blocks/wallet-address"; import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; import { SkeletonContainer } from "@/components/ui/skeleton"; -import { toUSD } from "../../../../utils/number"; +import type { UniversalBridgeWalletStats } from "@/types/analytics"; +import { toUSD } from "@/utils/number"; import { CardHeading, TableData, diff --git a/apps/dashboard/src/components/pay/PayAnalytics/PayEmbedFTUX.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayEmbedFTUX.tsx similarity index 100% rename from apps/dashboard/src/components/pay/PayAnalytics/PayEmbedFTUX.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayEmbedFTUX.tsx diff --git a/apps/dashboard/src/components/pay/PayAnalytics/components/PayNewCustomers.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayNewCustomers.tsx similarity index 98% rename from apps/dashboard/src/components/pay/PayAnalytics/components/PayNewCustomers.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayNewCustomers.tsx index 1360f4b4657..5ee7fca6c09 100644 --- a/apps/dashboard/src/components/pay/PayAnalytics/components/PayNewCustomers.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PayNewCustomers.tsx @@ -1,8 +1,8 @@ "use client"; import { useId, useMemo } from "react"; import { Area, AreaChart, ResponsiveContainer, Tooltip, XAxis } from "recharts"; -import type { UniversalBridgeWalletStats } from "types/analytics"; import { SkeletonContainer } from "@/components/ui/skeleton"; +import type { UniversalBridgeWalletStats } from "@/types/analytics"; import { CardHeading, chartHeight, NoDataOverlay } from "./common"; type GraphDataItem = { diff --git a/apps/dashboard/src/components/pay/PayAnalytics/components/PaymentHistory.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PaymentHistory.tsx similarity index 99% rename from apps/dashboard/src/components/pay/PayAnalytics/components/PaymentHistory.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PaymentHistory.tsx index cc98c95bb0b..e896757b2c3 100644 --- a/apps/dashboard/src/components/pay/PayAnalytics/components/PaymentHistory.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PaymentHistory.tsx @@ -9,8 +9,8 @@ import { type PaymentsResponse, } from "@/api/universal-bridge/developer"; import { ExportToCSVButton } from "@/components/blocks/ExportToCSVButton"; +import { PaginationButtons } from "@/components/blocks/pagination-buttons"; import { WalletAddress } from "@/components/blocks/wallet-address"; -import { PaginationButtons } from "@/components/pagination-buttons"; import { Badge } from "@/components/ui/badge"; import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; import { Skeleton } from "@/components/ui/skeleton"; diff --git a/apps/dashboard/src/components/pay/PayAnalytics/components/PaymentsSuccessRate.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PaymentsSuccessRate.tsx similarity index 98% rename from apps/dashboard/src/components/pay/PayAnalytics/components/PaymentsSuccessRate.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PaymentsSuccessRate.tsx index 31b273a8e33..c3ff120056c 100644 --- a/apps/dashboard/src/components/pay/PayAnalytics/components/PaymentsSuccessRate.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/PaymentsSuccessRate.tsx @@ -1,6 +1,5 @@ "use client"; import { useMemo, useState } from "react"; -import type { UniversalBridgeStats } from "types/analytics"; import { Select, SelectContent, @@ -11,6 +10,7 @@ import { import { SkeletonContainer } from "@/components/ui/skeleton"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; +import type { UniversalBridgeStats } from "@/types/analytics"; import { CardHeading } from "./common"; type PayVolumeType = "all" | "crypto" | "fiat"; diff --git a/apps/dashboard/src/components/pay/PayAnalytics/components/Payouts.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/Payouts.tsx similarity index 97% rename from apps/dashboard/src/components/pay/PayAnalytics/components/Payouts.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/Payouts.tsx index a60261580db..8608a0abe12 100644 --- a/apps/dashboard/src/components/pay/PayAnalytics/components/Payouts.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/Payouts.tsx @@ -1,9 +1,9 @@ "use client"; import { useMemo } from "react"; import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis } from "recharts"; -import type { UniversalBridgeStats } from "types/analytics"; import { SkeletonContainer } from "@/components/ui/skeleton"; -import { toUSD } from "../../../../utils/number"; +import type { UniversalBridgeStats } from "@/types/analytics"; +import { toUSD } from "@/utils/number"; import { CardHeading, chartHeight, NoDataOverlay } from "./common"; type GraphData = { diff --git a/apps/dashboard/src/components/pay/PayAnalytics/components/TotalPayVolume.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/TotalPayVolume.tsx similarity index 98% rename from apps/dashboard/src/components/pay/PayAnalytics/components/TotalPayVolume.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/TotalPayVolume.tsx index 990a057d8e1..e2fc08d2c2d 100644 --- a/apps/dashboard/src/components/pay/PayAnalytics/components/TotalPayVolume.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/TotalPayVolume.tsx @@ -1,7 +1,6 @@ "use client"; import { useId, useMemo, useState } from "react"; import { Area, AreaChart, ResponsiveContainer, Tooltip, XAxis } from "recharts"; -import type { UniversalBridgeStats } from "types/analytics"; import { Select, SelectContent, @@ -9,6 +8,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import type { UniversalBridgeStats } from "@/types/analytics"; import { CardHeading, chartHeight, NoDataOverlay } from "./common"; type GraphData = { diff --git a/apps/dashboard/src/components/pay/PayAnalytics/components/TotalVolumePieChart.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/TotalVolumePieChart.tsx similarity index 97% rename from apps/dashboard/src/components/pay/PayAnalytics/components/TotalVolumePieChart.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/TotalVolumePieChart.tsx index d3b3a855e64..041387ebbc7 100644 --- a/apps/dashboard/src/components/pay/PayAnalytics/components/TotalVolumePieChart.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/TotalVolumePieChart.tsx @@ -1,9 +1,9 @@ "use client"; import { Cell, Pie, PieChart } from "recharts"; -import type { UniversalBridgeStats } from "types/analytics"; import { SkeletonContainer } from "@/components/ui/skeleton"; import { cn } from "@/lib/utils"; -import { toUSD } from "../../../../utils/number"; +import type { UniversalBridgeStats } from "@/types/analytics"; +import { toUSD } from "@/utils/number"; import { chartHeight } from "./common"; type VolData = { diff --git a/apps/dashboard/src/components/pay/PayAnalytics/code-examples.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/code-examples.tsx similarity index 100% rename from apps/dashboard/src/components/pay/PayAnalytics/code-examples.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/code-examples.tsx diff --git a/apps/dashboard/src/components/pay/PayAnalytics/components/common.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/common.tsx similarity index 100% rename from apps/dashboard/src/components/pay/PayAnalytics/components/common.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/common.tsx diff --git a/apps/dashboard/src/lib/time.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/time.ts similarity index 84% rename from apps/dashboard/src/lib/time.ts rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/time.ts index c7c8aab8abd..0ed01bf5143 100644 --- a/apps/dashboard/src/lib/time.ts +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/components/time.ts @@ -1,5 +1,5 @@ +import type { DurationId } from "@/components/analytics/date-range-selector"; import { getFiltersFromSearchParams } from "@/lib/time"; -import type { DurationId } from "../components/analytics/date-range-selector"; export function getUniversalBridgeFiltersFromSearchParams(params: { from: string | undefined | string[]; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/page.tsx index dd7264b64c0..61e28bd6da2 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/page.tsx @@ -1,17 +1,17 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { loginRedirect } from "@app/login/loginRedirect"; -import { PayAnalyticsFilter } from "components/pay/PayAnalytics/components/PayAnalyticsFilter"; -import { PayAnalytics } from "components/pay/PayAnalytics/PayAnalytics"; -import { getUniversalBridgeFiltersFromSearchParams } from "lib/time"; import { ArrowUpRightIcon } from "lucide-react"; import { redirect } from "next/navigation"; import { ResponsiveSearchParamsProvider, ResponsiveSuspense, } from "responsive-rsc"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { PayAnalytics } from "./components/PayAnalytics"; +import { PayAnalyticsFilter } from "./components/PayAnalyticsFilter"; +import { getUniversalBridgeFiltersFromSearchParams } from "./components/time"; export default async function Page(props: { params: Promise<{ diff --git a/apps/dashboard/src/components/pay/PayConfig.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/PayConfig.tsx similarity index 98% rename from apps/dashboard/src/components/pay/PayConfig.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/PayConfig.tsx index 896762cb9ce..fa472b89687 100644 --- a/apps/dashboard/src/components/pay/PayConfig.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/PayConfig.tsx @@ -2,10 +2,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; -import { - type ApiKeyPayConfigValidationSchema, - apiKeyPayConfigValidationSchema, -} from "components/settings/ApiKeys/validations"; import Link from "next/link"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; @@ -20,6 +16,10 @@ import { FormLabel, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; +import { + type ApiKeyPayConfigValidationSchema, + apiKeyPayConfigValidationSchema, +} from "@/schema/validations"; interface PayConfigProps { project: Project; diff --git a/apps/dashboard/src/components/pay/RouteDiscovery.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/RouteDiscovery.tsx similarity index 97% rename from apps/dashboard/src/components/pay/RouteDiscovery.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/RouteDiscovery.tsx index e87f39d0319..18f56b1ea40 100644 --- a/apps/dashboard/src/components/pay/RouteDiscovery.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/RouteDiscovery.tsx @@ -2,16 +2,12 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; import type { ProjectResponse } from "@thirdweb-dev/service-utils"; -import { NetworkSelectorButton } from "components/selects/NetworkSelectorButton"; -import { - type RouteDiscoveryValidationSchema, - routeDiscoveryValidationSchema, -} from "components/settings/ApiKeys/validations"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; import { addUniversalBridgeTokenRoute } from "@/api/universal-bridge/tokens"; // Adjust the import path import { RouteDiscoveryCard } from "@/components/blocks/RouteDiscoveryCard"; +import { NetworkSelectorButton } from "@/components/misc/NetworkSelectorButton"; import { Form, FormControl, @@ -20,6 +16,10 @@ import { FormLabel, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; +import { + type RouteDiscoveryValidationSchema, + routeDiscoveryValidationSchema, +} from "@/schema/validations"; export const RouteDiscovery = ({ project, diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/page.tsx index 64eddd5b2e0..79d3746396e 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/page.tsx @@ -1,8 +1,8 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { loginRedirect } from "@app/login/loginRedirect"; -import { PayConfig } from "components/pay/PayConfig"; -import { RouteDiscovery } from "components/pay/RouteDiscovery"; +import { PayConfig } from "@app/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/PayConfig"; +import { RouteDiscovery } from "@app/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/RouteDiscovery"; import { redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getTeamBySlug } from "@/api/team"; import { getFees } from "@/api/universal-bridge/developer"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/webhooks/components/webhooks.client.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/webhooks/components/webhooks.client.tsx index ce819a31c55..f805c42ebe5 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/webhooks/components/webhooks.client.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/webhooks/components/webhooks.client.tsx @@ -8,7 +8,6 @@ import { type PropsWithChildren, useMemo, useState } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { randomPrivateKey } from "thirdweb/wallets"; -import { shortenString } from "utils/usedapp-external"; import { z } from "zod"; import { createWebhook, @@ -55,6 +54,7 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; +import { shortenString } from "@/utils/usedapp-external"; type PayWebhooksPageProps = { clientId: string; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/vault/components/list-access-tokens.client.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/vault/components/list-access-tokens.client.tsx index 33c18b3b4a1..a17d7ee4cf5 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/vault/components/list-access-tokens.client.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/vault/components/list-access-tokens.client.tsx @@ -4,7 +4,6 @@ import { listAccessTokens, revokeAccessToken } from "@thirdweb-dev/vault-sdk"; import { Loader2Icon, LockIcon, Trash2Icon } from "lucide-react"; import { useState } from "react"; import { toast } from "sonner"; -import { toDateTimeLocal } from "utils/date-utils"; import type { Project } from "@/api/projects"; import { Button } from "@/components/ui/button"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; @@ -16,6 +15,7 @@ import { } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; import { Skeleton } from "@/components/ui/skeleton"; +import { toDateTimeLocal } from "@/utils/date-utils"; import { createWalletAccessToken, initVaultClient, diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/vault/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/vault/page.tsx index c27ea7701b9..3869505fc2f 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/vault/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/vault/page.tsx @@ -1,5 +1,5 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { notFound } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { KeyManagement } from "./components/key-management"; diff --git a/apps/dashboard/src/components/embedded-wallets/Analytics/InAppWalletUsersChartCard.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/InAppWalletUsersChartCard.stories.tsx similarity index 96% rename from apps/dashboard/src/components/embedded-wallets/Analytics/InAppWalletUsersChartCard.stories.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/InAppWalletUsersChartCard.stories.tsx index 0b8911e3c10..f22155c6f46 100644 --- a/apps/dashboard/src/components/embedded-wallets/Analytics/InAppWalletUsersChartCard.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/InAppWalletUsersChartCard.stories.tsx @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import type { InAppWalletAuth } from "thirdweb/wallets"; -import type { InAppWalletStats } from "types/analytics"; -import { BadgeContainer } from "../../../stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; +import type { InAppWalletStats } from "@/types/analytics"; import { InAppWalletUsersChartCardUI } from "./InAppWalletUsersChartCard"; const meta = { diff --git a/apps/dashboard/src/components/embedded-wallets/Analytics/InAppWalletUsersChartCard.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/InAppWalletUsersChartCard.tsx similarity index 93% rename from apps/dashboard/src/components/embedded-wallets/Analytics/InAppWalletUsersChartCard.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/InAppWalletUsersChartCard.tsx index 24bd1eb213c..bb6151ddc33 100644 --- a/apps/dashboard/src/components/embedded-wallets/Analytics/InAppWalletUsersChartCard.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/InAppWalletUsersChartCard.tsx @@ -1,15 +1,15 @@ "use client"; -import { ReactIcon } from "components/icons/brand-icons/ReactIcon"; -import { TypeScriptIcon } from "components/icons/brand-icons/TypeScriptIcon"; -import { UnityIcon } from "components/icons/brand-icons/UnityIcon"; -import { UnrealIcon } from "components/icons/brand-icons/UnrealIcon"; -import { DocLink } from "components/shared/DocLink"; import { format } from "date-fns"; import { useMemo } from "react"; -import type { InAppWalletStats } from "types/analytics"; import { ThirdwebBarChart } from "@/components/blocks/charts/bar-chart"; +import { DocLink } from "@/components/blocks/DocLink"; import { ExportToCSVButton } from "@/components/blocks/ExportToCSVButton"; import type { ChartConfig } from "@/components/ui/chart"; +import { ReactIcon } from "@/icons/brand-icons/ReactIcon"; +import { TypeScriptIcon } from "@/icons/brand-icons/TypeScriptIcon"; +import { UnityIcon } from "@/icons/brand-icons/UnityIcon"; +import { UnrealIcon } from "@/icons/brand-icons/UnrealIcon"; +import type { InAppWalletStats } from "@/types/analytics"; type ChartData = Record & { time: string; // human readable date diff --git a/apps/dashboard/src/components/embedded-wallets/Analytics/Summary.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/Summary.tsx similarity index 95% rename from apps/dashboard/src/components/embedded-wallets/Analytics/Summary.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/Summary.tsx index c41fe4628ce..482b4c8ddce 100644 --- a/apps/dashboard/src/components/embedded-wallets/Analytics/Summary.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/Summary.tsx @@ -1,9 +1,9 @@ -import { StatCard } from "components/analytics/stat"; import { subDays } from "date-fns"; import { ActivityIcon, UserIcon } from "lucide-react"; import { Suspense } from "react"; -import type { InAppWalletStats } from "types/analytics"; import { getInAppWalletUsage } from "@/api/analytics"; +import { StatCard } from "@/components/analytics/stat"; +import type { InAppWalletStats } from "@/types/analytics"; function InAppWalletsSummaryInner(props: { allTimeStats: InAppWalletStats[] | undefined; diff --git a/apps/dashboard/src/components/embedded-wallets/Analytics/index.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/index.tsx similarity index 89% rename from apps/dashboard/src/components/embedded-wallets/Analytics/index.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/index.tsx index 7fb56cbd277..e6a1be34980 100644 --- a/apps/dashboard/src/components/embedded-wallets/Analytics/index.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/index.tsx @@ -1,11 +1,11 @@ +import { Suspense } from "react"; +import { getInAppWalletUsage } from "@/api/analytics"; import { getLastNDaysRange, type Range, -} from "components/analytics/date-range-selector"; -import { Suspense } from "react"; -import { getInAppWalletUsage } from "@/api/analytics"; -import type { InAppWalletStats } from "../../../types/analytics"; -import { RangeSelector } from "../../analytics/range-selector"; +} from "@/components/analytics/date-range-selector"; +import { RangeSelector } from "@/components/analytics/range-selector"; +import type { InAppWalletStats } from "../../../../../../../../../@/types/analytics"; import { InAppWalletUsersChartCardUI } from "./InAppWalletUsersChartCard"; type InAppWalletAnalyticsProps = { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx index b3194470ae6..3ffa63a684b 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx @@ -1,8 +1,8 @@ -import type { Range } from "components/analytics/date-range-selector"; -import { InAppWalletAnalytics } from "components/embedded-wallets/Analytics"; -import { InAppWalletsSummary } from "components/embedded-wallets/Analytics/Summary"; import { redirect } from "next/navigation"; import { getProject } from "@/api/projects"; +import type { Range } from "@/components/analytics/date-range-selector"; +import { InAppWalletAnalytics } from "./analytics/chart"; +import { InAppWalletsSummary } from "./analytics/chart/Summary"; export default async function Page(props: { params: Promise<{ team_slug: string; project_slug: string }>; diff --git a/apps/dashboard/src/components/embedded-wallets/Configure/InAppWalletSettingsUI.stories.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/components/InAppWalletSettingsUI.stories.tsx similarity index 93% rename from apps/dashboard/src/components/embedded-wallets/Configure/InAppWalletSettingsUI.stories.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/components/InAppWalletSettingsUI.stories.tsx index d7b01cb4df3..d962541bb36 100644 --- a/apps/dashboard/src/components/embedded-wallets/Configure/InAppWalletSettingsUI.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/components/InAppWalletSettingsUI.stories.tsx @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import type { Team } from "@/api/team"; -import { projectStub } from "../../../stories/stubs"; -import { storybookThirdwebClient } from "../../../stories/utils"; +import { projectStub } from "@/storybook/stubs"; +import { storybookThirdwebClient } from "@/storybook/utils"; import { InAppWalletSettingsUI } from "./index"; const meta = { diff --git a/apps/dashboard/src/components/embedded-wallets/Configure/index.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/components/index.tsx similarity index 98% rename from apps/dashboard/src/components/embedded-wallets/Configure/index.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/components/index.tsx index 43c07596788..7c1a0342fd4 100644 --- a/apps/dashboard/src/components/embedded-wallets/Configure/index.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/components/index.tsx @@ -1,14 +1,8 @@ "use client"; -import { updateProjectClient } from "@3rdweb-sdk/react/hooks/useApi"; import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; import type { ProjectEmbeddedWalletsService } from "@thirdweb-dev/service-utils"; -import { GatedSwitch } from "components/settings/Account/Billing/GatedSwitch"; -import { - type ApiKeyEmbeddedWalletsValidationSchema, - apiKeyEmbeddedWalletsValidationSchema, -} from "components/settings/ApiKeys/validations"; import { CircleAlertIcon, PlusIcon, Trash2Icon } from "lucide-react"; import Link from "next/link"; import type React from "react"; @@ -17,10 +11,10 @@ import { type UseFormReturn, useFieldArray, useForm } from "react-hook-form"; import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; import { upload } from "thirdweb/storage"; -import { toArrFromList } from "utils/string"; import type { Project } from "@/api/projects"; import type { SMSCountryTiers } from "@/api/sms"; import type { Team } from "@/api/team"; +import { GatedSwitch } from "@/components/blocks/GatedSwitch"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { DynamicHeight } from "@/components/ui/DynamicHeight"; @@ -38,10 +32,16 @@ import { Label } from "@/components/ui/label"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { Textarea } from "@/components/ui/textarea"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; -import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler"; +import { planToTierRecordForGating } from "@/constants/planToTierRecord"; +import { updateProjectClient } from "@/hooks/useApi"; import { cn } from "@/lib/utils"; -import { planToTierRecordForGating } from "../../settings/Account/Billing/planToTierRecord"; -import { FileInput } from "../../shared/FileInput"; +import { + type ApiKeyEmbeddedWalletsValidationSchema, + apiKeyEmbeddedWalletsValidationSchema, +} from "@/schema/validations"; +import { resolveSchemeWithErrorHandler } from "@/utils/resolveSchemeWithErrorHandler"; +import { toArrFromList } from "@/utils/string"; +import { FileInput } from "../../../../../../../../../@/components/blocks/FileInput"; import CountrySelector from "./sms-country-select/country-selector"; type InAppWalletSettingsPageProps = { diff --git a/apps/dashboard/src/components/embedded-wallets/Configure/sms-country-select/country-selector.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/components/sms-country-select/country-selector.tsx similarity index 100% rename from apps/dashboard/src/components/embedded-wallets/Configure/sms-country-select/country-selector.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/components/sms-country-select/country-selector.tsx diff --git a/apps/dashboard/src/components/embedded-wallets/Configure/sms-country-select/utils.ts b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/components/sms-country-select/utils.ts similarity index 100% rename from apps/dashboard/src/components/embedded-wallets/Configure/sms-country-select/utils.ts rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/components/sms-country-select/utils.ts diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/page.tsx index 56a59dc3023..4469b1c57cb 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/settings/page.tsx @@ -1,12 +1,12 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { loginRedirect } from "@app/login/loginRedirect"; -import { getValidTeamPlan } from "@app/team/components/TeamHeader/getValidTeamPlan"; -import { InAppWalletSettingsPage } from "components/embedded-wallets/Configure"; import { redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getSMSCountryTiers } from "@/api/sms"; import { getTeamBySlug } from "@/api/team"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; +import { getValidTeamPlan } from "@/utils/getValidTeamPlan"; +import { InAppWalletSettingsPage } from "./components"; export default async function Page(props: { params: Promise<{ team_slug: string; project_slug: string }>; diff --git a/apps/dashboard/src/components/embedded-wallets/Users/SearchInput.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/users/components/SearchInput.tsx similarity index 100% rename from apps/dashboard/src/components/embedded-wallets/Users/SearchInput.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/users/components/SearchInput.tsx diff --git a/apps/dashboard/src/components/embedded-wallets/Users/index.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/users/components/index.tsx similarity index 98% rename from apps/dashboard/src/components/embedded-wallets/Users/index.tsx rename to apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/users/components/index.tsx index 4c58aaa43cb..6eedaced070 100644 --- a/apps/dashboard/src/components/embedded-wallets/Users/index.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/users/components/index.tsx @@ -1,17 +1,13 @@ "use client"; -import { - useAllEmbeddedWallets, - useEmbeddedWallets, -} from "@3rdweb-sdk/react/hooks/useEmbeddedWallets"; import { createColumnHelper } from "@tanstack/react-table"; -import { TWTable } from "components/shared/TWTable"; import { format } from "date-fns"; import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react"; import Papa from "papaparse"; import { useCallback, useMemo, useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import type { WalletUser } from "thirdweb/wallets"; +import { TWTable } from "@/components/blocks/TWTable"; import { WalletAddress } from "@/components/blocks/wallet-address"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/Spinner/Spinner"; @@ -21,6 +17,10 @@ import { TooltipProvider, TooltipTrigger, } from "@/components/ui/tooltip"; +import { + useAllEmbeddedWallets, + useEmbeddedWallets, +} from "@/hooks/useEmbeddedWallets"; import { SearchInput } from "./SearchInput"; const getUserIdentifier = (accounts: WalletUser["linkedAccounts"]) => { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/users/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/users/page.tsx index e20009024c0..4af11dac835 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/users/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/users/page.tsx @@ -1,7 +1,7 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { loginRedirect } from "@app/login/loginRedirect"; -import { InAppWalletUsersPageContent } from "components/embedded-wallets/Users"; +import { InAppWalletUsersPageContent } from "@app/team/[team_slug]/[project_slug]/(sidebar)/wallets/users/components"; import { redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/ReviewStep.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/ReviewStep.tsx index 4d961b8a5cd..1c36494b42d 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/ReviewStep.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/ReviewStep.tsx @@ -3,7 +3,6 @@ import { CheckIcon, PlayIcon, XIcon } from "lucide-react"; import type { UseFormReturn } from "react-hook-form"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/Spinner/Spinner"; - import { truncateMiddle } from "../utils/abiUtils"; import type { WebhookFormValues } from "../utils/webhookTypes"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/WebhooksTable.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/WebhooksTable.tsx index dc7aa6afa8b..d715486f32b 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/WebhooksTable.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/WebhooksTable.tsx @@ -1,7 +1,6 @@ "use client"; import type { ColumnDef } from "@tanstack/react-table"; -import { TWTable } from "components/shared/TWTable"; import { format } from "date-fns"; import { PlayIcon, TrashIcon } from "lucide-react"; import { useMemo, useState } from "react"; @@ -12,6 +11,7 @@ import { type WebhookFilters, type WebhookResponse, } from "@/api/insight/webhooks"; +import { TWTable } from "@/components/blocks/TWTable"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/page.tsx index 53e25b1b122..e37517b0622 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/page.tsx @@ -1,5 +1,5 @@ -import { getAuthToken } from "@app/api/lib/getAuthToken"; import { notFound } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getProject } from "@/api/projects"; import { UnderlineLink } from "@/components/ui/UnderlineLink"; import { ContractsWebhooksPageContent } from "./contract-webhooks/contract-webhooks-page"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/layout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/layout.tsx index e419dbe5955..a96963c293d 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/layout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/layout.tsx @@ -1,15 +1,15 @@ import { redirect } from "next/navigation"; import { getProjects } from "@/api/projects"; import { getTeams } from "@/api/team"; -import { AppFooter } from "@/components/blocks/app-footer"; +import { AppFooter } from "@/components/footers/app-footer"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { ErrorProvider } from "../../../../../../../../contexts/error-handler"; -import { SharedContractLayout } from "../../../../../../(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout"; -import { getValidAccount } from "../../../../../../account/settings/getAccount"; import { getAuthToken, getAuthTokenWalletAddress, -} from "../../../../../../api/lib/getAuthToken"; +} from "../../../../../../../../@/api/auth-token"; +import { ErrorProvider } from "../../../../../../../../@/contexts/error-handler"; +import { SharedContractLayout } from "../../../../../../(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout"; +import { getValidAccount } from "../../../../../../account/settings/getAccount"; import { TeamHeaderLoggedIn } from "../../../../../components/TeamHeader/team-header-logged-in.client"; import { SaveLastUsedProject } from "../../../(sidebar)/components/SaveLastUsedProject"; import type { ProjectContractPageParams } from "./types"; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/layout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/layout.tsx index 8e2f9965153..ab2ef92fbfc 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/layout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/layout.tsx @@ -1,8 +1,8 @@ import { redirect } from "next/navigation"; import { Suspense } from "react"; import { getTeamBySlug, hasToCompleteTeamOnboarding } from "@/api/team"; -import { getAuthToken } from "../../api/lib/getAuthToken"; -import { EnsureValidConnectedWalletLoginServer } from "../../components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer"; +import { EnsureValidConnectedWalletLoginServer } from "@/components/misc/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer"; +import { getAuthToken } from "../../../../@/api/auth-token"; import { SaveLastVisitedTeamPage } from "../components/last-visited-page/SaveLastVisitedPage"; import { PastDueBanner, diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/AnalyticsHeader.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/AnalyticsHeader.tsx index d70cce057e7..d2b6dbed2d3 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/AnalyticsHeader.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/AnalyticsHeader.tsx @@ -1,5 +1,5 @@ -import type { Range } from "components/analytics/date-range-selector"; -import { RangeSelector } from "components/analytics/range-selector"; +import type { Range } from "@/components/analytics/date-range-selector"; +import { RangeSelector } from "@/components/analytics/range-selector"; export function AnalyticsHeader(props: { title: string; diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/BarChart.stories.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/BarChart.stories.tsx index c3032c71de0..a3981bae80b 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/BarChart.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/BarChart.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { BarChart } from "./BarChart"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/BarChart.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/BarChart.tsx index 8e7394af21b..8f0dfcd7349 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/BarChart.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/BarChart.tsx @@ -1,6 +1,4 @@ "use client"; -import { EmptyChartState } from "components/analytics/empty-chart-state"; -import { formatTickerNumber } from "lib/format-utils"; import { Bar, CartesianGrid, @@ -8,13 +6,15 @@ import { XAxis, YAxis, } from "recharts"; -import { toUSD } from "utils/number"; +import { EmptyChartState } from "@/components/analytics/empty-chart-state"; import { type ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent, } from "@/components/ui/chart"; +import { formatTickerNumber } from "@/utils/format-utils"; +import { toUSD } from "@/utils/number"; export function BarChart({ chartConfig, diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/CombinedBarChartCard.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/CombinedBarChartCard.tsx index ccb82c4214a..e3dab317f27 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/CombinedBarChartCard.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/CombinedBarChartCard.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; -import { toUSD } from "utils/number"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { toUSD } from "@/utils/number"; import { BarChart } from "./BarChart"; import { Stat } from "./Stat"; diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/CombinedStatBreakdownCard.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/CombinedStatBreakdownCard.tsx index 4c05a5cbfea..849cb907f94 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/CombinedStatBreakdownCard.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/CombinedStatBreakdownCard.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; -import { toUSD } from "utils/number"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { toUSD } from "@/utils/number"; import { Stat } from "./Stat"; import { StatBreakdown } from "./StatBreakdown"; diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/EmptyState.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/EmptyState.tsx index 15cc1dd2bc0..24d96cb3d98 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/EmptyState.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/EmptyState.tsx @@ -1,13 +1,13 @@ -import { DotNetIcon } from "components/icons/brand-icons/DotNetIcon"; -import { ReactIcon } from "components/icons/brand-icons/ReactIcon"; -import { TypeScriptIcon } from "components/icons/brand-icons/TypeScriptIcon"; -import { UnityIcon } from "components/icons/brand-icons/UnityIcon"; -import { UnrealIcon } from "components/icons/brand-icons/UnrealIcon"; -import { DocLink } from "components/shared/DocLink"; import { ArrowRightIcon } from "lucide-react"; import Image, { type StaticImageData } from "next/image"; import Link from "next/link"; +import { DocLink } from "@/components/blocks/DocLink"; import { Button } from "@/components/ui/button"; +import { DotNetIcon } from "@/icons/brand-icons/DotNetIcon"; +import { ReactIcon } from "@/icons/brand-icons/ReactIcon"; +import { TypeScriptIcon } from "@/icons/brand-icons/TypeScriptIcon"; +import { UnityIcon } from "@/icons/brand-icons/UnityIcon"; +import { UnrealIcon } from "@/icons/brand-icons/UnrealIcon"; import { cn } from "@/lib/utils"; import accountAbstractionIcon from "../../../../../../public/assets/tw-icons/account-abstraction.svg"; import authIcon from "../../../../../../public/assets/tw-icons/auth.svg"; diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/EmptyStateCard.stories.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/EmptyStateCard.stories.tsx index 953721e0d35..d7b0fc92c45 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/EmptyStateCard.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/EmptyStateCard.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { EmptyStateCard } from "./EmptyStateCard"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/PieChart.stories.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/PieChart.stories.tsx index 2028b3587a5..306ae199f13 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/PieChart.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/PieChart.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { PieChart } from "./PieChart"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/PieChart.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/PieChart.tsx index faeffe84080..d43c4b49949 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/PieChart.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/PieChart.tsx @@ -1,6 +1,5 @@ "use client"; -import { formatTickerNumber } from "lib/format-utils"; import { Pie, PieChart as RechartsPieChart } from "recharts"; import { type ChartConfig, @@ -8,6 +7,7 @@ import { ChartTooltip, ChartTooltipContent, } from "@/components/ui/chart"; +import { formatTickerNumber } from "@/utils/format-utils"; export function PieChart({ title, diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/PieChartCard.stories.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/PieChartCard.stories.tsx index 6495b0e6aab..9d01fbd9a1f 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/PieChartCard.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/PieChartCard.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { PieChartCard } from "./PieChartCard"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/Stat.stories.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/Stat.stories.tsx index 277030005d2..fdaa417f220 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/Stat.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/Stat.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { Stat } from "./Stat"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdown.stories.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdown.stories.tsx index 63701161bbf..a74d870936b 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdown.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdown.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { StatBreakdown } from "./StatBreakdown"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdown.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdown.tsx index b93c044c637..439e8cd3f62 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdown.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdown.tsx @@ -1,7 +1,7 @@ "use client"; import { useId, useMemo } from "react"; -import { toUSD } from "utils/number"; import { Table, TableBody, TableCell, TableRow } from "@/components/ui/table"; +import { toUSD } from "@/utils/number"; type Data = { label: string; diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdownCard.stories.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdownCard.stories.tsx index 4eccf494171..b45c5627804 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdownCard.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdownCard.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { BadgeContainer } from "stories/utils"; +import { BadgeContainer } from "@/storybook/utils"; import { StatBreakdownCard } from "./StatBreakdownCard"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdownCard.tsx b/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdownCard.tsx index 0d203283748..a3e159504da 100644 --- a/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdownCard.tsx +++ b/apps/dashboard/src/app/(app)/team/components/Analytics/StatBreakdownCard.tsx @@ -1,5 +1,5 @@ -import { toUSD } from "utils/number"; import { Card, CardContent, CardHeader } from "@/components/ui/card"; +import { toUSD } from "@/utils/number"; import { Stat } from "./Stat"; import { StatBreakdown } from "./StatBreakdown"; diff --git a/apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.stories.tsx b/apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.stories.tsx index 29109e63302..12a9ff010d2 100644 --- a/apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.stories.tsx @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; import { mobileViewport, storybookThirdwebClient, -} from "../../../../../stories/utils"; +} from "../../../../../@/storybook/utils"; import { HeaderLoggedOut } from "./HeaderLoggedOut"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.tsx b/apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.tsx index a86b0e6cb21..3e4536e8c83 100644 --- a/apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.tsx +++ b/apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.tsx @@ -3,7 +3,7 @@ import Link from "next/link"; import { usePathname } from "next/navigation"; import type { ThirdwebClient } from "thirdweb"; -import { ToggleThemeButton } from "@/components/color-mode-toggle"; +import { ToggleThemeButton } from "@/components/blocks/color-mode-toggle"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { SecondaryNavLinks } from "../../../components/Header/SecondaryNav/SecondaryNav"; diff --git a/apps/dashboard/src/app/(app)/team/components/TeamHeader/ProjectSelectorUI.tsx b/apps/dashboard/src/app/(app)/team/components/TeamHeader/ProjectSelectorUI.tsx index d83ff9bf566..f1935dc0edc 100644 --- a/apps/dashboard/src/app/(app)/team/components/TeamHeader/ProjectSelectorUI.tsx +++ b/apps/dashboard/src/app/(app)/team/components/TeamHeader/ProjectSelectorUI.tsx @@ -6,7 +6,7 @@ import { useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import type { Project } from "@/api/projects"; import type { Team } from "@/api/team"; -import { ProjectAvatar } from "@/components/blocks/Avatars/ProjectAvatar"; +import { ProjectAvatar } from "@/components/blocks/avatar/project-avatar"; import { Button } from "@/components/ui/button"; import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; import { Separator } from "@/components/ui/separator"; diff --git a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamAndProjectSelectorPopoverButton.tsx b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamAndProjectSelectorPopoverButton.tsx index 48a21628d99..72a655eb1ca 100644 --- a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamAndProjectSelectorPopoverButton.tsx +++ b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamAndProjectSelectorPopoverButton.tsx @@ -1,6 +1,5 @@ "use client"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { ChevronsUpDownIcon } from "lucide-react"; import { useState } from "react"; import type { ThirdwebClient } from "thirdweb"; @@ -13,6 +12,7 @@ import { PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; +import type { Account } from "@/hooks/useApi"; import { ProjectSelectorUI } from "./ProjectSelectorUI"; import { TeamSelectionUI } from "./TeamSelectionUI"; diff --git a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.stories.tsx b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.stories.tsx index 842d7ad65e2..acb288a1bda 100644 --- a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.stories.tsx +++ b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.stories.tsx @@ -1,14 +1,14 @@ import type { Meta, StoryObj } from "@storybook/nextjs"; -import { teamsAndProjectsStub } from "stories/stubs"; -import { - BadgeContainer, - mobileViewport, - storybookThirdwebClient, -} from "stories/utils"; import { ThirdwebProvider } from "thirdweb/react"; import type { Project } from "@/api/projects"; import type { Team } from "@/api/team"; import { Button } from "@/components/ui/button"; +import { teamsAndProjectsStub } from "@/storybook/stubs"; +import { + BadgeContainer, + mobileViewport, + storybookThirdwebClient, +} from "@/storybook/utils"; import { TeamHeaderDesktopUI, TeamHeaderMobileUI } from "./TeamHeaderUI"; const meta = { diff --git a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx index 30f43b92397..843600534e0 100644 --- a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx +++ b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx @@ -1,17 +1,17 @@ -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import Link from "next/link"; import type { ThirdwebClient } from "thirdweb"; import type { Project } from "@/api/projects"; import type { Team } from "@/api/team"; -import { GradientAvatar } from "@/components/blocks/Avatars/GradientAvatar"; -import { ProjectAvatar } from "@/components/blocks/Avatars/ProjectAvatar"; +import { GradientAvatar } from "@/components/blocks/avatar/gradient-avatar"; +import { ProjectAvatar } from "@/components/blocks/avatar/project-avatar"; +import { TeamPlanBadge } from "@/components/blocks/TeamPlanBadge"; +import { NotificationsButton } from "@/components/notifications/notification-button"; +import type { Account } from "@/hooks/useApi"; import { cn } from "@/lib/utils"; -import { NotificationsButton } from "../../../../../@/components/blocks/notifications/notification-button"; +import { getValidTeamPlan } from "@/utils/getValidTeamPlan"; import { SecondaryNav } from "../../../components/Header/SecondaryNav/SecondaryNav"; import { MobileBurgerMenuButton } from "../../../components/MobileBurgerMenuButton"; -import { TeamPlanBadge } from "../../../components/TeamPlanBadge"; import { ThirdwebMiniLogo } from "../../../components/ThirdwebMiniLogo"; -import { getValidTeamPlan } from "./getValidTeamPlan"; import { ProjectSelectorMobileMenuButton } from "./ProjectSelectorMobileMenuButton"; import { TeamAndProjectSelectorPopoverButton } from "./TeamAndProjectSelectorPopoverButton"; import { TeamSelectorMobileMenuButton } from "./TeamSelectorMobileMenuButton"; diff --git a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx index 6ed002682b1..62fdfd5113f 100644 --- a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx +++ b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx @@ -1,4 +1,3 @@ -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { CirclePlusIcon } from "lucide-react"; import Link from "next/link"; import { usePathname } from "next/navigation"; @@ -6,13 +5,14 @@ import { useState } from "react"; import type { ThirdwebClient } from "thirdweb"; import type { Project } from "@/api/projects"; import type { Team } from "@/api/team"; -import { GradientAvatar } from "@/components/blocks/Avatars/GradientAvatar"; +import { GradientAvatar } from "@/components/blocks/avatar/gradient-avatar"; +import { TeamPlanBadge } from "@/components/blocks/TeamPlanBadge"; import { Button } from "@/components/ui/button"; import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; import { Separator } from "@/components/ui/separator"; +import type { Account } from "@/hooks/useApi"; import { cn } from "@/lib/utils"; -import { TeamPlanBadge } from "../../../components/TeamPlanBadge"; -import { getValidTeamPlan } from "./getValidTeamPlan"; +import { getValidTeamPlan } from "@/utils/getValidTeamPlan"; import { SearchInput } from "./SearchInput"; import { TeamVerifiedIcon } from "./team-verified-icon"; diff --git a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectorMobileMenuButton.tsx b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectorMobileMenuButton.tsx index 1eefa0714f4..0bce8af868e 100644 --- a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectorMobileMenuButton.tsx +++ b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectorMobileMenuButton.tsx @@ -1,6 +1,5 @@ "use client"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; import { ChevronsUpDownIcon } from "lucide-react"; import type { ThirdwebClient } from "thirdweb"; import type { Project } from "@/api/projects"; @@ -8,6 +7,7 @@ import type { Team } from "@/api/team"; import { Button } from "@/components/ui/button"; import { DynamicHeight } from "@/components/ui/DynamicHeight"; import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog"; +import type { Account } from "@/hooks/useApi"; import { TeamSelectionUI } from "./TeamSelectionUI"; type TeamSelectorMobileMenuButtonProps = { diff --git a/apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header-logged-in.client.tsx b/apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header-logged-in.client.tsx index 51ba973b47b..d9c5e639b7d 100644 --- a/apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header-logged-in.client.tsx +++ b/apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header-logged-in.client.tsx @@ -1,8 +1,6 @@ "use client"; -import { CustomConnectWallet } from "@3rdweb-sdk/react/components/connect-wallet"; -import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; -import { LazyCreateProjectDialog } from "components/settings/ApiKeys/Create/LazyCreateAPIKeyDialog"; +import { doLogout } from "@app/login/auth-actions"; import { useCallback, useState } from "react"; import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; @@ -13,8 +11,10 @@ import { useIdentifyTeam } from "@/analytics/hooks/identify-team"; import { resetAnalytics } from "@/analytics/reset"; import type { Project } from "@/api/projects"; import type { Team } from "@/api/team"; +import { CustomConnectWallet } from "@/components/connect-wallet"; +import { LazyCreateProjectDialog } from "@/components/project/create-project-modal/LazyCreateAPIKeyDialog"; +import type { Account } from "@/hooks/useApi"; import { useDashboardRouter } from "@/lib/DashboardRouter"; -import { doLogout } from "../../../login/auth-actions"; import { type TeamHeaderCompProps, TeamHeaderDesktopUI, diff --git a/apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header.tsx b/apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header.tsx index 99ea9575c7b..dba3a549efb 100644 --- a/apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header.tsx +++ b/apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header.tsx @@ -1,13 +1,13 @@ -import { LAST_USED_TEAM_ID } from "constants/cookies"; import { cookies } from "next/headers"; import { getProjects } from "@/api/projects"; import { getTeams } from "@/api/team"; +import { LAST_USED_TEAM_ID } from "@/constants/cookies"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getRawAccount } from "../../../account/settings/getAccount"; import { getAuthToken, getAuthTokenWalletAddress, -} from "../../../api/lib/getAuthToken"; +} from "../../../../../@/api/auth-token"; +import { getRawAccount } from "../../../account/settings/getAccount"; import { HeaderLoggedOut } from "../HeaderLoggedOut/HeaderLoggedOut"; import { TeamHeaderLoggedIn } from "./team-header-logged-in.client"; diff --git a/apps/dashboard/src/app/(app)/team/components/last-visited-page/SaveLastVisitedPage.tsx b/apps/dashboard/src/app/(app)/team/components/last-visited-page/SaveLastVisitedPage.tsx index b3af948866e..036c397443a 100644 --- a/apps/dashboard/src/app/(app)/team/components/last-visited-page/SaveLastVisitedPage.tsx +++ b/apps/dashboard/src/app/(app)/team/components/last-visited-page/SaveLastVisitedPage.tsx @@ -2,8 +2,8 @@ import { usePathname } from "next/navigation"; import { useEffect } from "react"; -import { LAST_USED_TEAM_ID } from "../../../../../constants/cookies"; -import { setCookie } from "../../../../../lib/cookie"; +import { LAST_USED_TEAM_ID } from "../../../../../@/constants/cookies"; +import { setCookie } from "../../../../../@/utils/cookie"; import { LAST_VISITED_TEAM_PAGE_PATH } from "./consts"; export function SaveLastVisitedTeamPage(props: { teamId: string }) { diff --git a/apps/dashboard/src/app/(app)/team/~/[[...paths]]/page.tsx b/apps/dashboard/src/app/(app)/team/~/[[...paths]]/page.tsx index 0f9b707f6ce..bb615462936 100644 --- a/apps/dashboard/src/app/(app)/team/~/[[...paths]]/page.tsx +++ b/apps/dashboard/src/app/(app)/team/~/[[...paths]]/page.tsx @@ -1,13 +1,13 @@ import { ChevronRightIcon, UsersIcon } from "lucide-react"; import Link from "next/link"; import { notFound, redirect } from "next/navigation"; +import { getAuthToken } from "@/api/auth-token"; import { getTeams, type Team } from "@/api/team"; -import { GradientAvatar } from "@/components/blocks/Avatars/GradientAvatar"; -import { AppFooter } from "@/components/blocks/app-footer"; +import { GradientAvatar } from "@/components/blocks/avatar/gradient-avatar"; +import { TeamPlanBadge } from "@/components/blocks/TeamPlanBadge"; +import { AppFooter } from "@/components/footers/app-footer"; import { DotsBackgroundPattern } from "@/components/ui/background-patterns"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getAuthToken } from "../../../api/lib/getAuthToken"; -import { TeamPlanBadge } from "../../../components/TeamPlanBadge"; import { TeamHeader } from "../../components/TeamHeader/team-header"; export default async function Page(props: { diff --git a/apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx b/apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx index 75793768bfb..34dcd8db65f 100644 --- a/apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx +++ b/apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx @@ -2,8 +2,8 @@ import { useTheme } from "next-themes"; import { PayEmbed, type TokenInfo } from "thirdweb/react"; -import { useV5DashboardChain } from "../../../../lib/v5-adapter"; -import { getSDKTheme } from "../../../(app)/components/sdk-component-theme"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; +import { getSDKTheme } from "@/utils/sdk-component-theme"; import { bridgeAppThirdwebClient } from "../../constants"; export function UniversalBridgeEmbed({ diff --git a/apps/dashboard/src/app/bridge/constants.ts b/apps/dashboard/src/app/bridge/constants.ts index 80eb639b635..95b7fdbc0ed 100644 --- a/apps/dashboard/src/app/bridge/constants.ts +++ b/apps/dashboard/src/app/bridge/constants.ts @@ -1,3 +1,9 @@ +import { createThirdwebClient } from "thirdweb"; +import { setThirdwebDomains } from "thirdweb/utils"; +import { + NEXT_PUBLIC_DASHBOARD_CLIENT_ID, + NEXT_PUBLIC_IPFS_GATEWAY_URL, +} from "@/constants/public-envs"; import { THIRDWEB_BRIDGE_URL, THIRDWEB_BUNDLER_DOMAIN, @@ -7,14 +13,8 @@ import { THIRDWEB_RPC_DOMAIN, THIRDWEB_SOCIAL_API_DOMAIN, THIRDWEB_STORAGE_DOMAIN, -} from "constants/urls"; -import { getVercelEnv } from "lib/vercel-utils"; -import { createThirdwebClient } from "thirdweb"; -import { setThirdwebDomains } from "thirdweb/utils"; -import { - NEXT_PUBLIC_DASHBOARD_CLIENT_ID, - NEXT_PUBLIC_IPFS_GATEWAY_URL, -} from "@/constants/public-envs"; +} from "@/constants/urls"; +import { getVercelEnv } from "@/utils/vercel"; function getBridgeThirdwebClient() { if (getVercelEnv() !== "production") { diff --git a/apps/dashboard/src/app/pay/components/client/PayPageEmbed.client.tsx b/apps/dashboard/src/app/pay/components/client/PayPageEmbed.client.tsx index 04348c2bf8e..6fe89dc3120 100644 --- a/apps/dashboard/src/app/pay/components/client/PayPageEmbed.client.tsx +++ b/apps/dashboard/src/app/pay/components/client/PayPageEmbed.client.tsx @@ -1,10 +1,10 @@ "use client"; import { payAppThirdwebClient } from "app/pay/constants"; -import { useV5DashboardChain } from "lib/v5-adapter"; import { useTheme } from "next-themes"; import { useEffect } from "react"; import { NATIVE_TOKEN_ADDRESS, toTokens } from "thirdweb"; import { AutoConnect, PayEmbed } from "thirdweb/react"; +import { useV5DashboardChain } from "@/hooks/chains/v5-adapter"; export function PayPageEmbed({ chainId, diff --git a/apps/dashboard/src/app/pay/components/client/PaymentLinkForm.client.tsx b/apps/dashboard/src/app/pay/components/client/PaymentLinkForm.client.tsx index 26aea3660e3..24c575b35d6 100644 --- a/apps/dashboard/src/app/pay/components/client/PaymentLinkForm.client.tsx +++ b/apps/dashboard/src/app/pay/components/client/PaymentLinkForm.client.tsx @@ -13,6 +13,7 @@ import { } from "thirdweb"; import { getCurrencyMetadata } from "thirdweb/extensions/erc20"; import { resolveScheme, upload } from "thirdweb/storage"; +import { FileInput } from "@/components/blocks/FileInput"; import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors"; import { TokenSelector } from "@/components/blocks/TokenSelector"; import { Button } from "@/components/ui/button"; @@ -20,9 +21,8 @@ import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; +import { resolveEns } from "@/lib/ens"; import { cn } from "@/lib/utils"; -import { FileInput } from "../../../../components/shared/FileInput"; -import { resolveEns } from "../../../../lib/ens"; export function PaymentLinkForm() { const [chainId, setChainId] = useState(); diff --git a/apps/dashboard/src/app/pay/constants.ts b/apps/dashboard/src/app/pay/constants.ts index 2638bf1deba..6000afb43c1 100644 --- a/apps/dashboard/src/app/pay/constants.ts +++ b/apps/dashboard/src/app/pay/constants.ts @@ -1,3 +1,9 @@ +import { createThirdwebClient } from "thirdweb"; +import { setThirdwebDomains } from "thirdweb/utils"; +import { + NEXT_PUBLIC_DASHBOARD_CLIENT_ID, + NEXT_PUBLIC_IPFS_GATEWAY_URL, +} from "@/constants/public-envs"; import { THIRDWEB_BRIDGE_URL, THIRDWEB_BUNDLER_DOMAIN, @@ -7,14 +13,8 @@ import { THIRDWEB_RPC_DOMAIN, THIRDWEB_SOCIAL_API_DOMAIN, THIRDWEB_STORAGE_DOMAIN, -} from "constants/urls"; -import { getVercelEnv } from "lib/vercel-utils"; -import { createThirdwebClient } from "thirdweb"; -import { setThirdwebDomains } from "thirdweb/utils"; -import { - NEXT_PUBLIC_DASHBOARD_CLIENT_ID, - NEXT_PUBLIC_IPFS_GATEWAY_URL, -} from "@/constants/public-envs"; +} from "@/constants/urls"; +import { getVercelEnv } from "@/utils/vercel"; function getPayThirdwebClient() { if (getVercelEnv() !== "production") { diff --git a/apps/dashboard/src/@/components/ChakraProviderSetup.tsx b/apps/dashboard/src/chakra/ChakraProviderSetup.tsx similarity index 95% rename from apps/dashboard/src/@/components/ChakraProviderSetup.tsx rename to apps/dashboard/src/chakra/ChakraProviderSetup.tsx index d934c8c4f59..831a82bba5f 100644 --- a/apps/dashboard/src/@/components/ChakraProviderSetup.tsx +++ b/apps/dashboard/src/chakra/ChakraProviderSetup.tsx @@ -3,7 +3,7 @@ import { ChakraProvider, useColorMode } from "@chakra-ui/react"; import { useTheme } from "next-themes"; import { useEffect } from "react"; -import chakraTheme from "../../theme"; +import chakraTheme from "./theme"; export function ChakraProviderSetup(props: { children: React.ReactNode }) { return ( diff --git a/apps/dashboard/src/@3rdweb-sdk/DO_NOT_ADD_THINGS_HERE.md b/apps/dashboard/src/chakra/DO_NOT_ADD_THINGS_HERE.md similarity index 100% rename from apps/dashboard/src/@3rdweb-sdk/DO_NOT_ADD_THINGS_HERE.md rename to apps/dashboard/src/chakra/DO_NOT_ADD_THINGS_HERE.md diff --git a/apps/dashboard/src/tw-components/button.tsx b/apps/dashboard/src/chakra/button.tsx similarity index 96% rename from apps/dashboard/src/tw-components/button.tsx rename to apps/dashboard/src/chakra/button.tsx index 9d372f63315..1ed8d9955ad 100644 --- a/apps/dashboard/src/tw-components/button.tsx +++ b/apps/dashboard/src/chakra/button.tsx @@ -10,10 +10,14 @@ import { Link, useButtonGroup, } from "@chakra-ui/react"; -import { useClipboard } from "hooks/useClipboard"; +import { + fontWeights, + letterSpacings, + lineHeights, +} from "chakra/theme/typography"; import { CheckIcon, CopyIcon, ExternalLinkIcon } from "lucide-react"; import { forwardRef as reactForwardRef } from "react"; -import { fontWeights, letterSpacings, lineHeights } from "theme/typography"; +import { useClipboard } from "@/hooks/useClipboard"; import { ChakraNextLink } from "./link"; import { convertFontSizeToCSSVar } from "./utils/typography"; diff --git a/apps/dashboard/src/tw-components/card.tsx b/apps/dashboard/src/chakra/card.tsx similarity index 100% rename from apps/dashboard/src/tw-components/card.tsx rename to apps/dashboard/src/chakra/card.tsx diff --git a/apps/dashboard/src/tw-components/form.tsx b/apps/dashboard/src/chakra/form.tsx similarity index 94% rename from apps/dashboard/src/tw-components/form.tsx rename to apps/dashboard/src/chakra/form.tsx index 458cf8a7f24..337ec534e36 100644 --- a/apps/dashboard/src/tw-components/form.tsx +++ b/apps/dashboard/src/chakra/form.tsx @@ -15,8 +15,8 @@ import { letterSpacings, lineHeights, type TypographySize, -} from "theme/typography"; -import type { ComponentWithChildren } from "types/component-with-children"; +} from "chakra/theme/typography"; +import type { ComponentWithChildren } from "@/types/component-with-children"; import { convertFontSizeToCSSVar } from "./utils/typography"; interface FormLabelProps extends Omit { diff --git a/apps/dashboard/src/tw-components/heading.tsx b/apps/dashboard/src/chakra/heading.tsx similarity index 87% rename from apps/dashboard/src/tw-components/heading.tsx rename to apps/dashboard/src/chakra/heading.tsx index e1e403747fe..0c5415002f5 100644 --- a/apps/dashboard/src/tw-components/heading.tsx +++ b/apps/dashboard/src/chakra/heading.tsx @@ -9,8 +9,8 @@ import { letterSpacings, lineHeights, type TypographySize, -} from "theme/typography"; -import type { ComponentWithChildren } from "types/component-with-children"; +} from "chakra/theme/typography"; +import type { ComponentWithChildren } from "@/types/component-with-children"; import { convertFontSizeToCSSVar } from "./utils/typography"; interface HeadingProps extends Omit { diff --git a/apps/dashboard/src/tw-components/link.tsx b/apps/dashboard/src/chakra/link.tsx similarity index 100% rename from apps/dashboard/src/tw-components/link.tsx rename to apps/dashboard/src/chakra/link.tsx diff --git a/apps/dashboard/src/tw-components/text.tsx b/apps/dashboard/src/chakra/text.tsx similarity index 86% rename from apps/dashboard/src/tw-components/text.tsx rename to apps/dashboard/src/chakra/text.tsx index dd77bf14533..9183f3f580e 100644 --- a/apps/dashboard/src/tw-components/text.tsx +++ b/apps/dashboard/src/chakra/text.tsx @@ -9,8 +9,8 @@ import { type TextBase, type TextSizes, type TypographySize, -} from "theme/typography"; -import type { ComponentWithChildren } from "types/component-with-children"; +} from "chakra/theme/typography"; +import type { ComponentWithChildren } from "@/types/component-with-children"; import { convertFontSizeToCSSVar } from "./utils/typography"; interface TextProps extends Omit { diff --git a/apps/dashboard/src/theme/colors.ts b/apps/dashboard/src/chakra/theme/colors.ts similarity index 100% rename from apps/dashboard/src/theme/colors.ts rename to apps/dashboard/src/chakra/theme/colors.ts diff --git a/apps/dashboard/src/theme/index.ts b/apps/dashboard/src/chakra/theme/index.ts similarity index 99% rename from apps/dashboard/src/theme/index.ts rename to apps/dashboard/src/chakra/theme/index.ts index 9013a25281f..db19061a041 100644 --- a/apps/dashboard/src/theme/index.ts +++ b/apps/dashboard/src/chakra/theme/index.ts @@ -2,8 +2,8 @@ import { extendTheme, type Theme } from "@chakra-ui/react"; import { getColor, mode } from "@chakra-ui/theme-tools"; -import { skeletonTheme } from "./chakra-componens/skeleton"; import { colors } from "./colors"; +import { skeletonTheme } from "./skeleton"; import { fontWeights, letterSpacings, lineHeights } from "./typography"; const chakraTheme: Theme = extendTheme({ diff --git a/apps/dashboard/src/theme/chakra-componens/skeleton.ts b/apps/dashboard/src/chakra/theme/skeleton.ts similarity index 100% rename from apps/dashboard/src/theme/chakra-componens/skeleton.ts rename to apps/dashboard/src/chakra/theme/skeleton.ts diff --git a/apps/dashboard/src/theme/typography.ts b/apps/dashboard/src/chakra/theme/typography.ts similarity index 100% rename from apps/dashboard/src/theme/typography.ts rename to apps/dashboard/src/chakra/theme/typography.ts diff --git a/apps/dashboard/src/tw-components/utils/typography.ts b/apps/dashboard/src/chakra/utils/typography.ts similarity index 82% rename from apps/dashboard/src/tw-components/utils/typography.ts rename to apps/dashboard/src/chakra/utils/typography.ts index 34b311b7bce..1acabbc4d30 100644 --- a/apps/dashboard/src/tw-components/utils/typography.ts +++ b/apps/dashboard/src/chakra/utils/typography.ts @@ -1,4 +1,4 @@ -import type { TypographyFontSize } from "theme/typography"; +import type { TypographyFontSize } from "chakra/theme/typography"; const FONT_SIZE_CSS_VAR_PREFIX = "--tw-font-size-" as const; diff --git a/apps/dashboard/src/components/not-found-page.tsx b/apps/dashboard/src/components/not-found-page.tsx deleted file mode 100644 index ed83431a96b..00000000000 --- a/apps/dashboard/src/components/not-found-page.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import Link from "next/link"; - -export function NotFoundPage() { - return ( -
-
-
-
- 404 -
- -
- -

- Uh oh. - Looks like you're lost! -

- -
- -
-

- Find live content on our{" "} - - homepage - - ,{" "} - - dashboard - {" "} - or{" "} - - developer portal - - . -

-
- - -
-
-
- ); -} - -type AuroraProps = { - size: { width: string; height: string }; - pos: { top: string; left: string }; - color: string; -}; - -const Aurora: React.FC = ({ color, pos, size }) => { - return ( -
- ); -}; diff --git a/apps/dashboard/src/contract-ui/DO_NOT_ADD_THINGS_HERE.md b/apps/dashboard/src/contract-ui/DO_NOT_ADD_THINGS_HERE.md deleted file mode 100644 index d869a3b0f16..00000000000 --- a/apps/dashboard/src/contract-ui/DO_NOT_ADD_THINGS_HERE.md +++ /dev/null @@ -1,3 +0,0 @@ -# DO NOT ADD NEW THINGS INSIDE THIS FOLDER OR SUB_FOLDERS - -This part of the dashboard is deprecated, and we are actively working on removing it. Please do not add new things here. If you need to add new things, please add them to the appropriate folder in the src folder. \ No newline at end of file diff --git a/apps/dashboard/src/core-ui/DO_NOT_ADD_THINGS_HERE.md b/apps/dashboard/src/core-ui/DO_NOT_ADD_THINGS_HERE.md deleted file mode 100644 index d869a3b0f16..00000000000 --- a/apps/dashboard/src/core-ui/DO_NOT_ADD_THINGS_HERE.md +++ /dev/null @@ -1,3 +0,0 @@ -# DO NOT ADD NEW THINGS INSIDE THIS FOLDER OR SUB_FOLDERS - -This part of the dashboard is deprecated, and we are actively working on removing it. Please do not add new things here. If you need to add new things, please add them to the appropriate folder in the src folder. \ No newline at end of file diff --git a/apps/dashboard/src/middleware.ts b/apps/dashboard/src/middleware.ts index 30b75952934..415e3593a9c 100644 --- a/apps/dashboard/src/middleware.ts +++ b/apps/dashboard/src/middleware.ts @@ -4,8 +4,8 @@ import { getChainMetadata } from "thirdweb/chains"; import { isValidENSName } from "thirdweb/utils"; import { isLoginRequired } from "@/constants/auth"; import { COOKIE_ACTIVE_ACCOUNT, COOKIE_PREFIX_TOKEN } from "@/constants/cookie"; +import { defineDashboardChain } from "@/lib/defineDashboardChain"; import { LAST_VISITED_TEAM_PAGE_PATH } from "./app/(app)/team/components/last-visited-page/consts"; -import { defineDashboardChain } from "./lib/defineDashboardChain"; // ignore assets, api - only intercept page routes export const config = { diff --git a/apps/dashboard/src/tw-components/DO_NOT_ADD_THINGS_HERE.md b/apps/dashboard/src/tw-components/DO_NOT_ADD_THINGS_HERE.md deleted file mode 100644 index d869a3b0f16..00000000000 --- a/apps/dashboard/src/tw-components/DO_NOT_ADD_THINGS_HERE.md +++ /dev/null @@ -1,3 +0,0 @@ -# DO NOT ADD NEW THINGS INSIDE THIS FOLDER OR SUB_FOLDERS - -This part of the dashboard is deprecated, and we are actively working on removing it. Please do not add new things here. If you need to add new things, please add them to the appropriate folder in the src folder. \ No newline at end of file diff --git a/apps/dashboard/src/tw-components/index.ts b/apps/dashboard/src/tw-components/index.ts deleted file mode 100644 index a8322040778..00000000000 --- a/apps/dashboard/src/tw-components/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from "./button"; -export * from "./card"; -export * from "./form"; -export * from "./heading"; -export * from "./link"; -export * from "./text";