Migrate more to Jotai (#17903)

Here we go again
This commit is contained in:
Charles Bochet
2026-02-12 18:13:31 +01:00
committed by GitHub
parent 3075707bf8
commit d5a8cc2085
48 changed files with 134 additions and 105 deletions
@@ -4,8 +4,9 @@ import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
import { gql, useMutation } from '@apollo/client';
import { useLingui } from '@lingui/react/macro';
import { useEffect } from 'react';
import { useRecoilState, useRecoilValue } from 'recoil';
import { useRecoilValue } from 'recoil';
import { isDefined } from 'twenty-shared/utils';
import { useRecoilStateV2 } from '@/ui/utilities/state/jotai/hooks/useRecoilStateV2';
const INITIATE_OTP_PROVISIONING_FOR_AUTHENTICATED_USER = gql`
mutation initiateOTPProvisioningForAuthenticatedUser {
@@ -17,7 +18,7 @@ const INITIATE_OTP_PROVISIONING_FOR_AUTHENTICATED_USER = gql`
export const TwoFactorAuthenticationSetupForSettingsEffect = () => {
const { enqueueErrorSnackBar } = useSnackBar();
const [qrCode, setQrCode] = useRecoilState(qrCodeState);
const [qrCode, setQrCode] = useRecoilStateV2(qrCodeState);
const currentUser = useRecoilValue(currentUserState);
const { t } = useLingui();