mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
refactor(experience): display secret code first when binding totp on mobile devices (#4743)
This commit is contained in:
parent
1c8ef14167
commit
30047e3c19
1 changed files with 3 additions and 1 deletions
|
@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
|
|||
import SectionLayout from '@/Layout/SectionLayout';
|
||||
import Button from '@/components/Button';
|
||||
import TextLink from '@/components/TextLink';
|
||||
import usePlatform from '@/hooks/use-platform';
|
||||
import useTextHandler from '@/hooks/use-text-handler';
|
||||
import { type TotpBindingState } from '@/types/guard';
|
||||
|
||||
|
@ -11,7 +12,8 @@ import * as styles from './index.module.scss';
|
|||
|
||||
const SecretSection = ({ secret, secretQrCode }: TotpBindingState) => {
|
||||
const { t } = useTranslation();
|
||||
const [isQrCodeFormat, setIsQrCodeFormat] = useState(true);
|
||||
const { isMobile } = usePlatform();
|
||||
const [isQrCodeFormat, setIsQrCodeFormat] = useState(!isMobile);
|
||||
const { copyText } = useTextHandler();
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in a new issue