Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Retain the auth modal and its state on accidental dismissal (#4893)

PRASHANT S BISHTa60c3184a92a
diff --git a/web/components/common/UserDropdown/UserDropdown.tsx b/web/components/common/UserDropdown/UserDropdown.tsx
index 4fe2270787..022de25985 100644
--- a/web/components/common/UserDropdown/UserDropdown.tsx
+++ b/web/components/common/UserDropdown/UserDropdown.tsx
@@ -213,6 +213,8 @@ export const UserDropdown: FC<UserDropdownProps> = ({
title="Authenticate"
open={showAuthModal}
handleCancel={() => setShowAuthModal(false)}
+ maskClosable={false}
+ destroyOnClose={false}
>
<AuthModal />
</Modal>
diff --git a/web/components/ui/Modal/Modal.tsx b/web/components/ui/Modal/Modal.tsx
index 7a920acb89..ec13e12ad2 100644
--- a/web/components/ui/Modal/Modal.tsx
+++ b/web/components/ui/Modal/Modal.tsx
@@ -14,6 +14,8 @@ export type ModalProps = {
children?: ReactNode;
height?: string;
width?: string;
+ maskClosable?: boolean;
+ destroyOnClose?: boolean;
};
export const Modal: FC<ModalProps> = ({
@@ -25,6 +27,8 @@ export const Modal: FC<ModalProps> = ({
afterClose = undefined,
height,
width,
+ maskClosable = true,
+ destroyOnClose = true,
children = undefined,
}) => {
const [loading, setLoading] = useState(!!url);
@@ -71,7 +75,8 @@ export const Modal: FC<ModalProps> = ({
zIndex={999}
footer={null}
centered
- destroyOnClose
+ maskClosable={maskClosable}
+ destroyOnClose={destroyOnClose}
className={styles.modal}
>
<ErrorBoundary