feat(frontend-provider): ✨ Update provider profile hook to use userId for profile data fetching and initialize provider with new logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
f2b217c999
commit
e07cbae84b
2 changed files with 4 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue