import { useState } from 'react'; import { User, Lock, Trash2, History, Search, Shield } from 'lucide-react'; const Settings = () => { const [userData, setUserData] = useState({ name: '', email: '', phone: '', ucid: '', currentPassword: '', newPassword: '', confirmPassword: '' }); const handleInputChange = (e) => { const { id, value } = e.target; setUserData(prevData => ({ ...prevData, [id]: value })); }; const handleProfileUpdate = (e) => { e.preventDefault(); // TODO: updated profile data to a server console.log('Profile updated:', userData); alert('Profile updated successfully!'); }; const handlePasswordUpdate = (e) => { e.preventDefault(); // TODO: validate and update password if (userData.newPassword !== userData.confirmPassword) { alert('New passwords do not match!'); return; } console.log('Password updated'); // Reset password fields setUserData(prevData => ({ ...prevData, currentPassword: '', newPassword: '', confirmPassword: '' })); alert('Password updated successfully!'); }; const handleDeleteHistory = (type) => { // TODO: Delete the specified history console.log(`Deleting ${type} history`); alert(`${type} history deleted successfully!`); }; return (
Delete all your search history on StudentMarket
Delete all your browsing history on StudentMarket
Once you delete your account, there is no going back. Please be certain.