Skip to content

Commit

Permalink
Use lazy modal on 2FA module
Browse files Browse the repository at this point in the history
  • Loading branch information
tassoevan committed Sep 8, 2023
1 parent b41f2c0 commit 7de8920
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/meteor/client/lib/2fa/process2faReturn.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { SHA256 } from '@rocket.chat/sha256';
import { Meteor } from 'meteor/meteor';
import { lazy } from 'react';

import TwoFactorModal from '../../components/TwoFactorModal';
import { imperativeModal } from '../imperativeModal';
import { isTotpInvalidError, isTotpRequiredError } from './utils';

const TwoFactorModal = lazy(() => import('../../components/TwoFactorModal'));

const twoFactorMethods = ['totp', 'email', 'password'] as const;

type TwoFactorMethod = (typeof twoFactorMethods)[number];
Expand Down

0 comments on commit 7de8920

Please sign in to comment.