decoupling isMicrosoftAuthEnabled and IsMicrosoftSyncEnabled (which has no reason to be used here) (#9854)

### what
decoupling auth and email synchro

### why
IsMicrosoftSyncEnabled (which has no reason to be used here) since we
now allow microsoft as a auth provider
This commit is contained in:
Guillim
2025-01-27 11:04:19 +01:00
committed by GitHub
parent 98671b6cd2
commit 8df3214e84

View File

@ -1,6 +1,5 @@
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
import { useTriggerApisOAuth } from '@/settings/accounts/hooks/useTriggerApiOAuth';
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
import styled from '@emotion/styled';
import { useLingui } from '@lingui/react/macro';
import { useRecoilValue } from 'recoil';
@ -12,7 +11,6 @@ import {
IconGoogle,
IconMicrosoft,
} from 'twenty-ui';
import { FeatureFlagKey } from '~/generated/graphql';
const StyledHeader = styled(CardHeader)`
align-items: center;
@ -35,9 +33,6 @@ export const SettingsAccountsListEmptyStateCard = ({
}: SettingsAccountsListEmptyStateCardProps) => {
const { triggerApisOAuth } = useTriggerApisOAuth();
const currentWorkspace = useRecoilValue(currentWorkspaceState);
const isMicrosoftSyncEnabled = useIsFeatureEnabled(
FeatureFlagKey.IsMicrosoftSyncEnabled,
);
const { t } = useLingui();
@ -53,7 +48,7 @@ export const SettingsAccountsListEmptyStateCard = ({
onClick={() => triggerApisOAuth('google')}
/>
)}
{isMicrosoftSyncEnabled && currentWorkspace?.isMicrosoftAuthEnabled && (
{currentWorkspace?.isMicrosoftAuthEnabled && (
<Button
Icon={IconMicrosoft}
title={t`Connect with Microsoft`}