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 (!isSupabaseConfigured) {
|
||||
aethexToast.info({
|
||||
title: 'Demo Mode',
|
||||
description: 'Profile updates are simulated in demo mode'
|
||||
// Use demo storage
|
||||
const updatedProfile = DemoStorageService.updateUserProfile(updates);
|
||||
setProfile(updatedProfile);
|
||||
aethexToast.success({
|
||||
title: 'Profile updated',
|
||||
description: 'Your profile has been updated successfully'
|
||||
});
|
||||
// Simulate profile update
|
||||
setProfile(prev => prev ? { ...prev, ...updates } : null);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue