fix(databases): resolve crash when opening rebuild database dialog

This commit is contained in:
Mauricio Siu
2026-07-07 11:52:13 -06:00
parent 215c4666ff
commit 4e3a6db83a
@@ -87,29 +87,29 @@ export const RebuildDatabase = ({ id, type }: Props) => {
<AlertTriangle className="h-5 w-5 text-destructive" /> <AlertTriangle className="h-5 w-5 text-destructive" />
Are you absolutely sure? Are you absolutely sure?
</AlertDialogTitle> </AlertDialogTitle>
<AlertDialogDescription className="space-y-2"> <AlertDialogDescription asChild>
<p>This action will:</p> <div className="space-y-2">
<ul className="list-disc list-inside space-y-1"> <p>This action will:</p>
<li>Stop the current database service</li> <ul className="list-disc list-inside space-y-1">
<li>Delete all existing data and volumes</li> <li>Stop the current database service</li>
<li>Reset to the default configuration</li> <li>Delete all existing data and volumes</li>
<li>Restart the service with a clean state</li> <li>Reset to the default configuration</li>
</ul> <li>Restart the service with a clean state</li>
<p className="font-medium text-destructive mt-4"> </ul>
This action cannot be undone. <p className="font-medium text-destructive mt-4">
</p> This action cannot be undone.
</p>
</div>
</AlertDialogDescription> </AlertDialogDescription>
</AlertDialogHeader> </AlertDialogHeader>
<AlertDialogFooter> <AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel> <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction <AlertDialogAction
onClick={handleRebuild} onClick={handleRebuild}
className="bg-destructive text-destructive-foreground hover:bg-destructive/90" disabled={isPending}
asChild variant="destructive"
> >
<Button isLoading={isPending} type="submit"> Yes, rebuild database
Yes, rebuild database
</Button>
</AlertDialogAction> </AlertDialogAction>
</AlertDialogFooter> </AlertDialogFooter>
</AlertDialogContent> </AlertDialogContent>