Remove onboarding flashes + close all dropdowns on CommandMenu close (#11483)
## Remove onboarding flashes Tested: - sign in with credentials - sign in with social oAuth - sign up with credentials - multidomain - single domain - reset password No more flashes, and code logic simplified! ## Close all dropdowns on CommandMenu close Before: https://github.com/user-attachments/assets/244ff935-3d40-47d5-a097-12d4cc3810dd After: https://github.com/user-attachments/assets/1de692f8-5032-404a-be74-025ebca67138 --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -6,7 +6,6 @@ import { Key } from 'ts-key-enum';
|
||||
|
||||
import { SubTitle } from '@/auth/components/SubTitle';
|
||||
import { Title } from '@/auth/components/Title';
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { OnboardingSyncEmailsSettingsCard } from '@/onboarding/components/OnboardingSyncEmailsSettingsCard';
|
||||
import { useSetNextOnboardingStatus } from '@/onboarding/hooks/useSetNextOnboardingStatus';
|
||||
import { PageHotkeyScope } from '@/types/PageHotkeyScope';
|
||||
@ -25,7 +24,6 @@ import { ClickToActionLink } from 'twenty-ui/navigation';
|
||||
import {
|
||||
CalendarChannelVisibility,
|
||||
MessageChannelVisibility,
|
||||
OnboardingStatus,
|
||||
useSkipSyncEmailOnboardingStepMutation,
|
||||
} from '~/generated/graphql';
|
||||
|
||||
@ -54,7 +52,6 @@ export const SyncEmails = () => {
|
||||
const theme = useTheme();
|
||||
const { triggerApisOAuth } = useTriggerApisOAuth();
|
||||
const setNextOnboardingStatus = useSetNextOnboardingStatus();
|
||||
const currentUser = useRecoilValue(currentUserState);
|
||||
const [visibility, setVisibility] = useState<MessageChannelVisibility>(
|
||||
MessageChannelVisibility.SHARE_EVERYTHING,
|
||||
);
|
||||
@ -106,10 +103,6 @@ export const SyncEmails = () => {
|
||||
[continueWithoutSync],
|
||||
);
|
||||
|
||||
if (currentUser?.onboardingStatus !== OnboardingStatus.SYNC_EMAIL) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Title noMarginTop>Emails and Calendar</Title>
|
||||
|
||||
Reference in New Issue
Block a user