fix: fix ref error in actions menu

This commit is contained in:
M-Gabrielly 2025-09-04 16:42:54 -03:00
parent 91c84b6a46
commit 3cce8a9774
2 changed files with 4 additions and 4 deletions

View File

@ -382,10 +382,10 @@ export default function PacientesPage() {
<TableCell> <TableCell>
<DropdownMenu> <DropdownMenu>
<DropdownMenuTrigger asChild> <DropdownMenuTrigger asChild>
<Button variant="ghost" className="h-8 w-8 p-0"> <button className="h-8 w-8 p-0 flex items-center justify-center rounded-md hover:bg-accent">
<span className="sr-only">Abrir menu</span> <span className="sr-only">Abrir menu</span>
<MoreHorizontal className="h-4 w-4" /> <MoreHorizontal className="h-4 w-4" />
</Button> </button>
</DropdownMenuTrigger> </DropdownMenuTrigger>
<DropdownMenuContent align="end"> <DropdownMenuContent align="end">
<DropdownMenuItem onClick={() => handleViewDetails(patient.id)}> <DropdownMenuItem onClick={() => handleViewDetails(patient.id)}>

View File

@ -1028,7 +1028,7 @@ export function PatientRegistrationForm({
} }
return ( return (
<Dialog open={open} onOpenChange={onOpenChange}> <Dialog open={open} onOpenChange={onOpenChange ?? (() => { })}>
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto"> <DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
<DialogHeader> <DialogHeader>
<DialogTitle className="flex items-center gap-2"> <DialogTitle className="flex items-center gap-2">
@ -1630,7 +1630,7 @@ export function PatientRegistrationForm({
{/* Botões de Ação */} {/* Botões de Ação */}
<div className="flex justify-end gap-4 pt-6 border-t"> <div className="flex justify-end gap-4 pt-6 border-t">
<Button type="button" variant="outline" onClick={() => onOpenChange(false)} disabled={isSubmitting}> <Button type="button" variant="outline" onClick={() => onOpenChange?.(false)} disabled={isSubmitting}>
<XCircle className="mr-2 h-4 w-4" /> <XCircle className="mr-2 h-4 w-4" />
Cancelar Cancelar
</Button> </Button>