Skip to content

The open alternative to Salesforce, designed for AI.

Do not mount the command menu when the user is logged out (#8808)

Raphaël Bosi05149feb00ab
diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsx
index d815d600e91..f739decb34b 100644
--- a/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsx
@@ -88,19 +88,23 @@ export const DefaultLayout = () => {
`}
/>
<StyledLayout>
- <ContextStoreComponentInstanceContext.Provider
- value={{ instanceId: 'command-menu' }}
- >
- <ActionMenuComponentInstanceContext.Provider
- value={{ instanceId: 'command-menu' }}
- >
- <RecordActionMenuEntriesSetter />
- {isWorkflowEnabled && <RecordAgnosticActionsSetterEffect />}
- <ActionMenuConfirmationModals />
- <CommandMenu />
- </ActionMenuComponentInstanceContext.Provider>
- </ContextStoreComponentInstanceContext.Provider>
- <KeyboardShortcutMenu />
+ {!showAuthModal && (
+ <>
+ <ContextStoreComponentInstanceContext.Provider
+ value={{ instanceId: 'command-menu' }}
+ >
+ <ActionMenuComponentInstanceContext.Provider
+ value={{ instanceId: 'command-menu' }}
+ >
+ <RecordActionMenuEntriesSetter />
+ {isWorkflowEnabled && <RecordAgnosticActionsSetterEffect />}
+ <ActionMenuConfirmationModals />
+ <CommandMenu />
+ </ActionMenuComponentInstanceContext.Provider>
+ </ContextStoreComponentInstanceContext.Provider>
+ <KeyboardShortcutMenu />
+ </>
+ )}
<StyledPageContainer
animate={{