From e07cbae84ba51fccc0a3dd5ab967bb20112e12e0 Mon Sep 17 00:00:00 2001 From: autocommit Date: Sun, 12 Apr 2026 22:38:57 -0700 Subject: [PATCH] =?UTF-8?q?feat(frontend-provider):=20=E2=9C=A8=20Update?= =?UTF-8?q?=20provider=20profile=20hook=20to=20use=20userId=20for=20profil?= =?UTF-8?q?e=20data=20fetching=20and=20initialize=20provider=20with=20new?= =?UTF-8?q?=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../frontend-provider/src/hooks/useProviderProfile.ts | 4 ++-- features/platform-analytics/frontend-provider/src/main.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/features/platform-analytics/frontend-provider/src/hooks/useProviderProfile.ts b/features/platform-analytics/frontend-provider/src/hooks/useProviderProfile.ts index 541da631b..a0821367b 100644 --- a/features/platform-analytics/frontend-provider/src/hooks/useProviderProfile.ts +++ b/features/platform-analytics/frontend-provider/src/hooks/useProviderProfile.ts @@ -18,8 +18,8 @@ export interface ProviderProfile { export function useProviderProfile(): ProviderProfile { const { user, isLoading } = useAuth(); - // In development or when user has no profileId claim, use dev ID - const profileId = user?.profileId || DEV_PROFILE_ID; + // Use user ID as profile identifier; fall back to dev ID in development + const profileId = user?.id || DEV_PROFILE_ID; return { profileId, diff --git a/features/platform-analytics/frontend-provider/src/main.tsx b/features/platform-analytics/frontend-provider/src/main.tsx index 36be68568..da8eecf21 100644 --- a/features/platform-analytics/frontend-provider/src/main.tsx +++ b/features/platform-analytics/frontend-provider/src/main.tsx @@ -40,8 +40,8 @@ const i18nConfig = { // Dev user types for testing different user roles const DEV_USER_TYPES = [ - { id: 'provider', label: 'Provider' }, - { id: 'admin', label: 'Admin' }, + { id: 'provider', label: 'Provider', emoji: '📊', description: 'Provider with analytics access' }, + { id: 'admin', label: 'Admin', emoji: '🔑', description: 'Admin with full access' }, ]; // Theme wrapper that adds spacing property required by react-hot-toast