Client:Pages:Profile: use OPEN_BACKUP_CODES_DIALOG constant

This commit is contained in:
Darya Umrikhina 2024-08-12 15:39:19 +04:00
parent ba38054f16
commit de9cd72b7e

View File

@ -33,6 +33,7 @@ import { Text } from "@docspace/shared/components/text";
import { Button } from "@docspace/shared/components/button"; import { Button } from "@docspace/shared/components/button";
import { Link } from "@docspace/shared/components/link"; import { Link } from "@docspace/shared/components/link";
import { unlinkTfaApp } from "@docspace/shared/api/settings"; import { unlinkTfaApp } from "@docspace/shared/api/settings";
import { OPEN_BACKUP_CODES_DIALOG } from "@docspace/shared/constants";
import { import {
ResetApplicationDialog, ResetApplicationDialog,
BackupCodesDialog, BackupCodesDialog,
@ -57,9 +58,9 @@ const LoginSettings = (props) => {
useState(false); useState(false);
useEffect(() => { useEffect(() => {
if (sessionStorage.getItem("openBackupCodesDialog")) { if (sessionStorage.getItem(OPEN_BACKUP_CODES_DIALOG)) {
setBackupCodesDialogVisible(true); setBackupCodesDialogVisible(true);
sessionStorage.removeItem("openBackupCodesDialog"); sessionStorage.removeItem(OPEN_BACKUP_CODES_DIALOG);
} }
}, []); }, []);