'use client'; import React, { useState, useEffect } from 'react'; import { useRouter } from 'next/navigation'; import Link from 'next/link'; import { getProfile } from '@/app/API/profile/getProfile'; import './settings.scss'; const AccountSettingsPage = () => { const router = useRouter(); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [emailNotifications, setEmailNotifications] = useState(true); const [marketingEmails, setMarketingEmails] = useState(false); useEffect(() => { const loadSettings = async () => { try { // In the future, this could load user preferences from a settings API // For now, we just get the profile to check if it exists await getProfile(); setLoading(false); } catch (err) { setError('Failed to load settings'); setLoading(false); } }; loadSettings(); }, []); const handleSaveSettings = async () => { // This would save user preferences via an API call // For now, just simulate success setLoading(true); setTimeout(() => { setLoading(false); router.push('/profile'); }, 1000); }; if (loading) { return (
Loading...
); } return (

Account Settings

Manage your preferences and account settings

{error && (
{error}
)}
Notification Preferences

setEmailNotifications(!emailNotifications)} />
setMarketingEmails(!marketingEmails)} />
Account Management

Password and Security

Update your password and manage security settings

Change Password
Personal Information

Update your profile information and contact details

Edit Profile
Delete Account

This action will schedule your account for deletion

Delete Account
); }; export default AccountSettingsPage;