From 030c5228166d40cd917de4da732e7c336c411f6e Mon Sep 17 00:00:00 2001 From: MananTank Date: Tue, 1 Jul 2025 20:00:45 +0000 Subject: [PATCH] Dashboard: Add missing asset creation successs tracking for nft (#7494) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR focuses on enhancing the NFT launch functionality by adding a successful asset creation report feature. It imports a new reporting function and invokes it upon successful NFT launch, improving analytics tracking. ### Detailed summary - Added import for `reportAssetCreationSuccessful` from `@/analytics/report`. - Called `reportAssetCreationSuccessful` with parameters indicating asset type and contract type upon successful NFT launch. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` ## Summary by CodeRabbit * **New Features** * Added a success reporting step after completing the NFT launch process, providing improved feedback for successful NFT creation. --- .../(sidebar)/tokens/create/nft/launch/launch-nft.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 40acfb50e38..a294364716a 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 @@ -9,7 +9,10 @@ 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 { reportAssetCreationFailed } from "@/analytics/report"; +import { + reportAssetCreationFailed, + reportAssetCreationSuccessful, +} 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"; @@ -222,6 +225,11 @@ export function LaunchNFT(props: { } } + reportAssetCreationSuccessful({ + assetType: "nft", + contractType: ercType === "erc721" ? "DropERC721" : "DropERC1155", + }); + props.onLaunchSuccess(); batchesProcessedRef.current = 0; }