Skip to content

Commit 9572db0

Browse files
committed
[Dashboard]: fix client ID not being passed correctly to in app wallet user content (#5355)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## 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}` <!-- end pr-codex -->
1 parent 5de5418 commit 9572db0

File tree

1 file changed

+8
-1
lines changed
  • apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/in-app-wallets/users

1 file changed

+8
-1
lines changed

apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/in-app-wallets/users/page.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1+
import { getProject } from "@/api/projects";
12
import { InAppWalletUsersPageContent } from "components/embedded-wallets/Users";
3+
import { notFound } from "next/navigation";
24
import { TRACKING_CATEGORY } from "../_constants";
35

46
export default async function Page(props: {
57
params: Promise<{ team_slug: string; project_slug: string }>;
68
}) {
79
const params = await props.params;
10+
const project = await getProject(params.team_slug, params.project_slug);
11+
if (!project) {
12+
notFound();
13+
}
14+
815
return (
916
<>
1017
<InAppWalletUsersPageContent
11-
clientId={params.project_slug}
18+
clientId={project.publishableKey}
1219
trackingCategory={TRACKING_CATEGORY}
1320
/>
1421
</>

0 commit comments

Comments
 (0)