From 6cc3bea8027bb58a691efc8ca22b702e4fdcb840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Sat, 8 Feb 2025 21:38:52 +0100 Subject: [PATCH] fix(dashboard): decode uri before getting profile by id --- .../[projectId]/profiles/[profileId]/page.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/page.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/page.tsx index 982c8dcc..347296a4 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/page.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/page.tsx @@ -4,7 +4,7 @@ import { Padding } from '@/components/ui/padding'; import { getProfileName } from '@/utils/getters'; import { notFound } from 'next/navigation'; -import { getProfileByIdCached } from '@openpanel/db'; +import { getProfileById, getProfileByIdCached } from '@openpanel/db'; import MostEventsServer from './most-events'; import PopularRoutesServer from './popular-routes'; @@ -30,7 +30,10 @@ interface PageProps { export default async function Page({ params: { projectId, profileId }, }: PageProps) { - const profile = await getProfileByIdCached(profileId, projectId); + const profile = await getProfileById( + decodeURIComponent(profileId), + projectId, + ); if (!profile) { return notFound();