website refactor
This commit is contained in:
@@ -10,7 +10,7 @@ import StatusBadge from '@/components/ui/StatusBadge';
|
||||
import InfoBanner from '@/components/ui/InfoBanner';
|
||||
import PageHeader from '@/components/ui/PageHeader';
|
||||
import { siteConfig } from '@/lib/siteConfig';
|
||||
import { useSponsorBilling } from '@/hooks/sponsor/useSponsorBilling';
|
||||
import { useSponsorBilling } from "@/lib/hooks/sponsor/useSponsorBilling";
|
||||
import { useInject } from '@/lib/di/hooks/useInject';
|
||||
import { SPONSOR_SERVICE_TOKEN } from '@/lib/di/tokens';
|
||||
import {
|
||||
|
||||
@@ -8,7 +8,7 @@ import Card from '@/components/ui/Card';
|
||||
import Button from '@/components/ui/Button';
|
||||
import StatusBadge from '@/components/ui/StatusBadge';
|
||||
import InfoBanner from '@/components/ui/InfoBanner';
|
||||
import { useSponsorSponsorships } from '@/hooks/sponsor/useSponsorSponsorships';
|
||||
import { useSponsorSponsorships } from "@/lib/hooks/sponsor/useSponsorSponsorships";
|
||||
import {
|
||||
Megaphone,
|
||||
Trophy,
|
||||
|
||||
@@ -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