mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
remove workarounds in restart dialog
This commit is contained in:
parent
f843d3e549
commit
deffd7d2c2
@ -38,12 +38,6 @@ export default function RestartDialog({
|
||||
const [restartingSheetOpen, setRestartingSheetOpen] = useState(false);
|
||||
const [countdown, setCountdown] = useState(60);
|
||||
|
||||
const clearBodyPointerEvents = () => {
|
||||
if (typeof document !== "undefined") {
|
||||
document.body.style.pointerEvents = "";
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setRestartDialogOpen(isOpen);
|
||||
}, [isOpen]);
|
||||
@ -85,16 +79,10 @@ export default function RestartDialog({
|
||||
if (!open) {
|
||||
setRestartDialogOpen(false);
|
||||
onClose();
|
||||
clearBodyPointerEvents();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<AlertDialogContent
|
||||
onCloseAutoFocus={(event) => {
|
||||
event.preventDefault();
|
||||
clearBodyPointerEvents();
|
||||
}}
|
||||
>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>{t("restart.title")}</AlertDialogTitle>
|
||||
<AlertDialogDescription className="sr-only">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user