From 9572db007a227c4ef8a5cfad2ba14416d1d43ed4 Mon Sep 17 00:00:00 2001 From: ElasticBottle Date: Fri, 8 Nov 2024 04:15:45 +0000 Subject: [PATCH] [Dashboard]: fix client ID not being passed correctly to in app wallet user content (#5355) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem solved Short description of the bug fixed or feature added --- ## PR-Codex overview This PR enhances the `Page` component in the `in-app-wallets/users` directory by adding error handling for project retrieval and updating the `clientId` property passed to `InAppWalletUsersPageContent`. ### Detailed summary - Imported `notFound` from `next/navigation`. - Fetched the `project` using `getProject` based on `team_slug` and `project_slug`. - Added a check to call `notFound()` if the `project` is not found. - Updated `clientId` prop in `InAppWalletUsersPageContent` to use `project.publishableKey`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../[project_slug]/connect/in-app-wallets/users/page.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/in-app-wallets/users/page.tsx b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/in-app-wallets/users/page.tsx index 3792d5c23cc..603f13e0c6c 100644 --- a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/in-app-wallets/users/page.tsx +++ b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/in-app-wallets/users/page.tsx @@ -1,14 +1,21 @@ +import { getProject } from "@/api/projects"; import { InAppWalletUsersPageContent } from "components/embedded-wallets/Users"; +import { notFound } from "next/navigation"; import { TRACKING_CATEGORY } from "../_constants"; export default async function Page(props: { params: Promise<{ team_slug: string; project_slug: string }>; }) { const params = await props.params; + const project = await getProject(params.team_slug, params.project_slug); + if (!project) { + notFound(); + } + return ( <>