mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 01:51:12 -05:00
Fix: Remove duplicate danger zone and JSX structure
This commit is contained in:
@@ -425,29 +425,6 @@ export function AccountProfileTab() {
|
|||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{/* Danger Zone */}
|
|
||||||
<Card className="border-destructive/50">
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle className="text-destructive">Danger Zone</CardTitle>
|
|
||||||
<CardDescription>Irreversible account actions</CardDescription>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
<Button
|
|
||||||
variant="destructive"
|
|
||||||
onClick={() => setShowDeletionDialog(true)}
|
|
||||||
disabled={!!deletionRequest}
|
|
||||||
>
|
|
||||||
<Trash2 className="w-4 h-4 mr-2" />
|
|
||||||
Delete Account
|
|
||||||
</Button>
|
|
||||||
{deletionRequest && (
|
|
||||||
<p className="text-sm text-muted-foreground mt-2">
|
|
||||||
Account deletion already in progress
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
{/* Email Change Dialog */}
|
{/* Email Change Dialog */}
|
||||||
{user && (
|
{user && (
|
||||||
<EmailChangeDialog
|
<EmailChangeDialog
|
||||||
@@ -460,6 +437,27 @@ export function AccountProfileTab() {
|
|||||||
|
|
||||||
{/* Cancel Email Change Dialog */}
|
{/* Cancel Email Change Dialog */}
|
||||||
<AlertDialog open={showCancelEmailDialog} onOpenChange={setShowCancelEmailDialog}>
|
<AlertDialog open={showCancelEmailDialog} onOpenChange={setShowCancelEmailDialog}>
|
||||||
|
<AlertDialogContent>
|
||||||
|
<AlertDialogHeader>
|
||||||
|
<AlertDialogTitle>Cancel Email Change?</AlertDialogTitle>
|
||||||
|
<AlertDialogDescription>
|
||||||
|
This will cancel your pending email change to <strong>{pendingEmail}</strong>.
|
||||||
|
Your email will remain as <strong>{user?.email}</strong>.
|
||||||
|
You can start a new email change request at any time.
|
||||||
|
</AlertDialogDescription>
|
||||||
|
</AlertDialogHeader>
|
||||||
|
<AlertDialogFooter>
|
||||||
|
<AlertDialogCancel disabled={cancellingEmail}>Keep Change</AlertDialogCancel>
|
||||||
|
<AlertDialogAction
|
||||||
|
onClick={handleCancelEmailChange}
|
||||||
|
disabled={cancellingEmail}
|
||||||
|
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
||||||
|
>
|
||||||
|
{cancellingEmail ? 'Cancelling...' : 'Yes, Cancel Change'}
|
||||||
|
</AlertDialogAction>
|
||||||
|
</AlertDialogFooter>
|
||||||
|
</AlertDialogContent>
|
||||||
|
</AlertDialog>
|
||||||
|
|
||||||
{/* Danger Zone */}
|
{/* Danger Zone */}
|
||||||
<Card className="border-destructive">
|
<Card className="border-destructive">
|
||||||
@@ -489,28 +487,6 @@ export function AccountProfileTab() {
|
|||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<AlertDialogContent>
|
|
||||||
<AlertDialogHeader>
|
|
||||||
<AlertDialogTitle>Cancel Email Change?</AlertDialogTitle>
|
|
||||||
<AlertDialogDescription>
|
|
||||||
This will cancel your pending email change to <strong>{pendingEmail}</strong>.
|
|
||||||
Your email will remain as <strong>{user?.email}</strong>.
|
|
||||||
You can start a new email change request at any time.
|
|
||||||
</AlertDialogDescription>
|
|
||||||
</AlertDialogHeader>
|
|
||||||
<AlertDialogFooter>
|
|
||||||
<AlertDialogCancel disabled={cancellingEmail}>Keep Change</AlertDialogCancel>
|
|
||||||
<AlertDialogAction
|
|
||||||
onClick={handleCancelEmailChange}
|
|
||||||
disabled={cancellingEmail}
|
|
||||||
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
||||||
>
|
|
||||||
{cancellingEmail ? 'Cancelling...' : 'Yes, Cancel Change'}
|
|
||||||
</AlertDialogAction>
|
|
||||||
</AlertDialogFooter>
|
|
||||||
</AlertDialogContent>
|
|
||||||
</AlertDialog>
|
|
||||||
|
|
||||||
{/* Account Deletion Dialog */}
|
{/* Account Deletion Dialog */}
|
||||||
<AccountDeletionDialog
|
<AccountDeletionDialog
|
||||||
open={showDeletionDialog}
|
open={showDeletionDialog}
|
||||||
|
|||||||
Reference in New Issue
Block a user