feat: Implement contact form submission with API integration and status feedback, refactor user profiles page layout and scrolling, and remove updateSession call from profile settings.
This commit is contained in:
@@ -311,17 +311,8 @@ export function ProfileSettingsForm({
|
||||
});
|
||||
}
|
||||
|
||||
// Update session name without causing a page refresh
|
||||
try {
|
||||
const fullName = `${formData.firstName} ${formData.lastName}`.trim();
|
||||
await updateSession({
|
||||
user: { name: fullName },
|
||||
});
|
||||
} catch {
|
||||
// Session update can fail silently - profile is already saved
|
||||
}
|
||||
|
||||
// Dispatch event to notify header and other components to refresh profile data
|
||||
// (Don't call updateSession as it can trigger a full page reload in next-auth v5)
|
||||
window.dispatchEvent(new Event('profile-updated'));
|
||||
|
||||
if (onSave) {
|
||||
|
||||
Reference in New Issue
Block a user