Skip to content

Commit 5fedc2c

Browse files
committed
[TOOL-5037] Dashboard: Remove autoConnect on /login page (#7609)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on refactoring import paths for better organization and consistency across the codebase, as well as enhancing the login and onboarding components, including UI adjustments and functionality updates. ### Detailed summary - Updated import paths to use absolute imports instead of relative paths. - Modified the `DashboardLayout` to enable auto-connect. - Enhanced the `LoginPage` with a new footer message regarding phone login support. - Adjusted the `Toaster` component to simplify its usage. - Improved onboarding UI components for better user experience. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an option to enable automatic wallet connection in the app layout. * **Refactor** * Standardized import paths across the dashboard for improved maintainability and clarity. * Updated usage of the notification component to a local version with simplified theming. * Improved layout and messaging on the login page, moving phone login deprecation notice to a dedicated footer and refining spacing. * **Documentation** * Enhanced SEO and social sharing metadata on the login page. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 6c8a7cf commit 5fedc2c

File tree

102 files changed

+228
-181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+228
-181
lines changed

apps/dashboard/src/app/(app)/login/auth-actions.ts renamed to apps/dashboard/src/@/actions/auth-actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { COOKIE_ACTIVE_ACCOUNT, COOKIE_PREFIX_TOKEN } from "@/constants/cookie";
1212
import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "@/constants/public-envs";
1313
import { API_SERVER_SECRET } from "@/constants/server-envs";
1414
import { isVercel } from "@/utils/vercel";
15-
import { verifyTurnstileToken } from "./verifyTurnstileToken";
15+
import { verifyTurnstileToken } from "../../app/login/verifyTurnstileToken";
1616

1717
export async function getLoginPayload(
1818
params: GenerateLoginPayloadParams,

apps/dashboard/src/@/components/connect-wallet/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use client";
22

33
import { useFavoriteChainIds } from "@app/(dashboard)/(chain)/components/client/star-button";
4-
import { doLogout } from "@app/login/auth-actions";
54
import Image from "next/image";
65
import Link from "next/link";
76
import { usePathname } from "next/navigation";
@@ -14,6 +13,7 @@ import {
1413
useActiveAccount,
1514
useConnectModal,
1615
} from "thirdweb/react";
16+
import { doLogout } from "@/actions/auth-actions";
1717
import { resetAnalytics } from "@/analytics/reset";
1818
import { CustomChainRenderer } from "@/components/misc/CustomChainRenderer";
1919
import { LazyConfigureNetworkModal } from "@/components/misc/configure-networks/LazyConfigureNetworkModal";

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/chain-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { ThirdwebClient } from "thirdweb";
33
import type { ChainMetadata } from "thirdweb/chains";
44
import { Button } from "@/components/ui/button";
55
import { cn } from "@/lib/utils";
6-
import { mapV4ChainToV5Chain } from "../../../../../../../../@/utils/map-chains";
6+
import { mapV4ChainToV5Chain } from "@/utils/map-chains";
77
import { ChainIcon } from "../../../../components/server/chain-icon";
88
import { AddChainToWallet } from "../client/add-chain-to-wallet";
99

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
DropdownMenuTrigger,
2020
} from "@/components/ui/dropdown-menu";
2121
import { getClientThirdwebClient } from "@/constants/thirdweb-client.client";
22-
import { mapV4ChainToV5Chain } from "../../../../../../@/utils/map-chains";
22+
import { mapV4ChainToV5Chain } from "@/utils/map-chains";
2323
import { TeamHeader } from "../../../../team/components/TeamHeader/team-header";
2424
import { StarButton } from "../../components/client/star-button";
2525
import { getChain, getChainMetadata } from "../../utils";

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { getAddress, getContract, isAddress } from "thirdweb";
22
import { localhost } from "thirdweb/chains";
3+
import { getUserThirdwebClient } from "@/api/auth-token";
34
import { DASHBOARD_THIRDWEB_SECRET_KEY } from "@/constants/server-envs";
45
import { getConfiguredThirdwebClient } from "@/constants/thirdweb.server";
6+
import { fetchChainWithLocalOverrides } from "@/utils/fetchChainWithLocalOverrides";
57
import { mapV4ChainToV5Chain } from "@/utils/map-chains";
6-
import { getUserThirdwebClient } from "../../../../../../../@/api/auth-token";
7-
import { fetchChainWithLocalOverrides } from "../../../../../../../@/utils/fetchChainWithLocalOverrides";
88

99
export async function getContractPageParamsInfo(params: {
1010
contractAddress: string;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { notFound, redirect } from "next/navigation";
2-
import { getAuthTokenWalletAddress } from "../../../../../../../../@/api/auth-token";
2+
import { getAuthTokenWalletAddress } from "@/api/auth-token";
33
import type { ProjectMeta } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types";
44
import { redirectToContractLandingPage } from "../../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/utils";
55
import { buildContractPagePath } from "../../_utils/contract-page-path";

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by.server.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ThirdwebContract } from "thirdweb";
2-
import { getAuthTokenWalletAddress } from "../../../../../../../../@/api/auth-token";
2+
import { getAuthTokenWalletAddress } from "@/api/auth-token";
33
import { getPublishedByCardProps, PublishedByUI } from "./published-by-ui";
44

55
interface PublishedByProps {

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ import { Spinner } from "@/components/ui/Spinner/Spinner";
3939
import { ToolTipLabel } from "@/components/ui/tooltip";
4040
import { cn } from "@/lib/utils";
4141
import { parseError } from "@/utils/errorParser";
42+
import { getSDKTheme } from "@/utils/sdk-component-theme";
4243
import { tryCatch } from "@/utils/try-catch";
43-
import { getSDKTheme } from "../../../../../../../../../../@/utils/sdk-component-theme";
4444
import { PublicPageConnectButton } from "../../../_components/PublicPageConnectButton";
4545
import { SupplyClaimedProgress } from "../../../_components/supply-claimed-progress";
4646
import { TokenPrice } from "../../../_components/token-price";

apps/dashboard/src/app/(app)/(dashboard)/(chain)/chainlist/[chain_type]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ChevronDownIcon } from "lucide-react";
22
import { headers } from "next/headers";
33
import Link from "next/link";
4+
import { getAuthToken } from "@/api/auth-token";
45
import {
56
Breadcrumb,
67
BreadcrumbItem,
@@ -14,7 +15,6 @@ import {
1415
DropdownMenuItem,
1516
DropdownMenuTrigger,
1617
} from "@/components/ui/dropdown-menu";
17-
import { getAuthToken } from "../../../../../../@/api/auth-token";
1818
import {
1919
AllFilters,
2020
ChainOptionsFilter,

0 commit comments

Comments
 (0)