Skip to content

Commit 4978640

Browse files
committed
[Dashboard] Feature : Adding Next Steps guide into chain pages (#6743)
Add actionable next step guide for users who visit a chain page. Steps to Test: 1. Visit thirdweb.com/{chainID} 2. Scroll to the bottom and you should see ![image](https://github.com/user-attachments/assets/df68ad4b-a0b7-4384-9e2d-1bb207400087) 3. Click on the article 4. Get redirected to a blog post. <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces a new component called `NextSteps` to the `page.tsx` file in the dashboard application. This component provides users with actionable links and information related to integrating in-app wallets, enhancing user experience and adoption. ### Detailed summary - Added `NextSteps` component to `page.tsx`. - `NextSteps` displays a title and a link for creating a login for the specified `chain`. - Integrated tracking for link clicks using `useTrack` to monitor user engagement. - Included a brief description under the link in `NextSteps`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 64bd603 commit 4978640

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
"use client";
2+
import { useTrack } from "hooks/analytics/useTrack";
3+
import { FileText } from "lucide-react";
4+
import Link from "next/link";
5+
import type { ChainMetadata } from "thirdweb/chains";
6+
import { SectionTitle } from "../server/SectionTitle";
7+
8+
export default function NextSteps(props: { chain: ChainMetadata }) {
9+
const { chain } = props;
10+
const trackEvent = useTrack();
11+
12+
return (
13+
<section>
14+
<SectionTitle title="Next Steps" />
15+
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3">
16+
<div className="relative flex gap-3 rounded-lg border bg-card p-4 pr-8 transition-colors hover:border-active-border">
17+
<FileText className="mt-0.5 size-5 shrink-0" />
18+
<div>
19+
<h3 className="mb-1.5 font-medium">
20+
<Link
21+
href={
22+
"https://blog.thirdweb.com/supercharge-user-adoption-integrate-embedded-wallets-in-minutes/"
23+
}
24+
className="before:absolute before:inset-0"
25+
target="_blank"
26+
onClick={() =>
27+
trackEvent({
28+
category: "nextSteps",
29+
action: "click-inapp",
30+
label: "success",
31+
chain_id: chain.chainId,
32+
})
33+
}
34+
>
35+
Create a login for {chain.name}
36+
</Link>
37+
</h3>
38+
<p className="text-muted-foreground text-sm">
39+
Supercharge User Adoption—Integrate In-App Wallets in Minutes
40+
</p>
41+
</div>
42+
</div>
43+
</div>
44+
</section>
45+
);
46+
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { CircleAlertIcon } from "lucide-react";
22
import { getRawAccount } from "../../../../account/settings/getAccount";
33
import { getChain, getChainMetadata } from "../../utils";
4+
import NextSteps from "./components/client/NextSteps";
45
import { BuyFundsSection } from "./components/server/BuyFundsSection";
56
import { ChainOverviewSection } from "./components/server/ChainOverviewSection";
67
import { ClaimChainSection } from "./components/server/ClaimChainSection";
@@ -57,6 +58,8 @@ export default async function Page(props: {
5758
{chain.services.filter((s) => s.enabled).length > 0 && (
5859
<SupportedProductsSection services={chain.services} />
5960
)}
61+
{/*Next Steps */}
62+
<NextSteps chain={chain} />
6063

6164
{/* Claim Chain */}
6265
{!chainMetadata && <ClaimChainSection />}

0 commit comments

Comments
 (0)