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