Implemented session and account lockout management
Enabled account sync control and session expiration management Applied some fixes to the govername page and project page
This commit is contained in:
@@ -22,13 +22,19 @@ export const Modal: React.FC<ModalProps> = ({
|
||||
const handleKeyDown = (e: KeyboardEvent) => {
|
||||
if (e.key === 'Escape') onClose();
|
||||
};
|
||||
const handleDismissSubordinates = () => {
|
||||
onClose();
|
||||
};
|
||||
|
||||
if (isOpen) {
|
||||
document.body.style.overflow = 'hidden';
|
||||
window.addEventListener('keydown', handleKeyDown);
|
||||
window.addEventListener('pfm:dismiss-subordinates', handleDismissSubordinates);
|
||||
}
|
||||
return () => {
|
||||
document.body.style.overflow = 'unset';
|
||||
window.removeEventListener('keydown', handleKeyDown);
|
||||
window.removeEventListener('pfm:dismiss-subordinates', handleDismissSubordinates);
|
||||
};
|
||||
}, [isOpen, onClose]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user