Update updateProfile to use demo storage
cgen-92bfa12f800f4a8791b96c1dc0fac289
This commit is contained in:
parent
132c55fb72
commit
af01ad03e7
1 changed files with 6 additions and 5 deletions
|
|
@ -210,12 +210,13 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
|
||||||
if (!user) throw new Error('No user logged in');
|
if (!user) throw new Error('No user logged in');
|
||||||
|
|
||||||
if (!isSupabaseConfigured) {
|
if (!isSupabaseConfigured) {
|
||||||
aethexToast.info({
|
// Use demo storage
|
||||||
title: 'Demo Mode',
|
const updatedProfile = DemoStorageService.updateUserProfile(updates);
|
||||||
description: 'Profile updates are simulated in demo mode'
|
setProfile(updatedProfile);
|
||||||
|
aethexToast.success({
|
||||||
|
title: 'Profile updated',
|
||||||
|
description: 'Your profile has been updated successfully'
|
||||||
});
|
});
|
||||||
// Simulate profile update
|
|
||||||
setProfile(prev => prev ? { ...prev, ...updates } : null);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue