@@ -5,17 +5,18 @@ import {
55 GearIcon ,
66 PencilSimpleIcon ,
77 TrashIcon ,
8+ WarningCircleIcon ,
89} from "@phosphor-icons/react" ;
910import { useParams , useRouter } from "next/navigation" ;
1011import { useCallback , useState } from "react" ;
1112import { toast } from "sonner" ;
1213import { Button } from "@/components/ui/button" ;
14+ import { DeleteDialog } from "@/components/ui/delete-dialog" ;
1315import { Label } from "@/components/ui/label" ;
1416import { WebsiteDialog } from "@/components/website-dialog" ;
1517import { useDeleteWebsite , useWebsite } from "@/hooks/use-websites" ;
1618import { PageHeader } from "../../../_components/page-header" ;
1719import { TOAST_MESSAGES } from "../../_components/shared/tracking-constants" ;
18- import { DeleteWebsiteDialog } from "../_components/delete-dialog" ;
1920
2021export default function GeneralSettingsPage ( ) {
2122 const params = useParams ( ) ;
@@ -158,13 +159,30 @@ export default function GeneralSettingsPage() {
158159 open = { showEditDialog }
159160 website = { websiteData }
160161 />
161- < DeleteWebsiteDialog
162+ < DeleteDialog
163+ confirmLabel = "Delete Website"
164+ description = { `Are you sure you want to delete ${ websiteData . name || websiteData . domain } ?` }
162165 isDeleting = { deleteWebsiteMutation . isPending }
163- onConfirmDelete = { handleDeleteWebsite }
164- onOpenChange = { setShowDeleteDialog }
165- open = { showDeleteDialog }
166- websiteData = { websiteData }
167- />
166+ isOpen = { showDeleteDialog }
167+ itemName = { websiteData . name || websiteData . domain }
168+ onClose = { ( ) => setShowDeleteDialog ( false ) }
169+ onConfirm = { handleDeleteWebsite }
170+ title = "Delete Website"
171+ >
172+ < div className = "rounded-md bg-secondary p-3 text-sm" >
173+ < div className = "flex items-start gap-2" >
174+ < WarningCircleIcon className = "h-5 w-5 shrink-0" />
175+ < div className = "space-y-1" >
176+ < p className = "font-medium" > Warning:</ p >
177+ < ul className = "list-disc space-y-1 pl-4 text-xs" >
178+ < li > All analytics data will be permanently deleted</ li >
179+ < li > Tracking will stop immediately</ li >
180+ < li > All website settings will be lost</ li >
181+ </ ul >
182+ </ div >
183+ </ div >
184+ </ div >
185+ </ DeleteDialog >
168186 </ div >
169187 ) ;
170188}
0 commit comments