close sideside after two factor disable

This commit is contained in:
Abhinav-grd 2021-06-29 17:22:26 +05:30
parent 9b6cbbe773
commit 7c7d2bd1ef
2 changed files with 3 additions and 0 deletions

View file

@ -223,6 +223,7 @@ export default function Sidebar(props: Props) {
show={twoFactorModalView}
onHide={() => setTwoFactorModalView(false)}
setDialogMessage={props.setDialogMessage}
closeSidebar={() => setIsOpen(false)}
setLoading={props.setLoading}
/>
<LinkButton

View file

@ -13,6 +13,7 @@ interface Props {
onHide: () => void;
setDialogMessage: SetDialogMessage;
setLoading: SetLoading
closeSidebar: () => void
}
const Row = styled.div`
@ -58,6 +59,7 @@ function TwoFactorModal(props: Props) {
await disableTwoFactor();
setData(LS_KEYS.USER, { ...getData(LS_KEYS.USER), isTwoFactorEnabled: false });
props.onHide();
props.closeSidebar();
};
const warnTwoFactorReconfigure = async () => {
props.setDialogMessage({