website refactor
This commit is contained in:
@@ -33,6 +33,7 @@ import {
|
||||
Smartphone,
|
||||
AlertCircle
|
||||
} from 'lucide-react';
|
||||
import { logoutAction } from '@/app/actions/logoutAction';
|
||||
|
||||
// ============================================================================
|
||||
// Types
|
||||
@@ -174,10 +175,8 @@ export default function SponsorSettingsPage() {
|
||||
|
||||
const handleDeleteAccount = () => {
|
||||
if (confirm('Are you sure you want to delete your sponsor account? This action cannot be undone. All sponsorship data will be permanently removed.')) {
|
||||
// Call logout API to clear session
|
||||
fetch('/api/auth/logout', { method: 'POST' }).finally(() => {
|
||||
router.push('/');
|
||||
});
|
||||
// Call the logout action directly
|
||||
logoutAction();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user