Files
twenty/packages/twenty-front
Akash! ce4d0f3447 fix: hide "Create Workspace" button when multi-workspace is disabled (#22202)
## Description

This PR fixes a bug where the "Create Workspace" button was
unconditionally rendered in the workspace switcher dropdown, even when
single-workspace mode was active (`IS_MULTIWORKSPACE_ENABLED=false`).

This created a confusing "dead-end" action for users, as clicking the
button would do nothing (because the backend correctly blocks workspace
creation in this mode, and the frontend skips the redirect).

### Changes made
- Imported the `isMultiWorkspaceEnabledState` atom from client-config.
- Evaluated `isMultiWorkspaceEnabled` inside
`MultiWorkspaceDropdownDefaultComponents`.
- Conditionally rendered the "Create Workspace" `<MenuItem>` only if
multi-workspace is enabled.

Closes #22139


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/22202?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
2026-06-26 10:42:10 +02:00
..
2026-06-18 13:05:31 +00:00

Run yarn dev while server running on port 3000