Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

call the menu "Show navigator"

Oleg Isonenb529dc326ea7
diff --git a/apps/designer/app/designer/features/topbar/menu/menu.tsx b/apps/designer/app/designer/features/topbar/menu/menu.tsx
index ef86da72f5..a213e8fad7 100644
--- a/apps/designer/app/designer/features/topbar/menu/menu.tsx
+++ b/apps/designer/app/designer/features/topbar/menu/menu.tsx
@@ -70,12 +70,6 @@ const ThemeMenuItem = () => {
const ViewMenuItem = () => {
const [clientSettings, setClientSetting] = useClientSettings();
- const labels = {
- attached: "Attached",
- detached: "Detached",
- } as const;
-
- const settings = Object.keys(labels) as Array<keyof typeof labels>;
return (
<DropdownMenu>
@@ -84,18 +78,19 @@ const ViewMenuItem = () => {
<ChevronRightIcon />
</DropdownMenuTriggerItem>
<DropdownMenuContent>
- {settings.map((setting) => (
- <DropdownMenuCheckboxItem
- key={setting}
- checked={clientSettings.navigatorLayout === setting}
- css={menuItemCss}
- onSelect={() => {
- setClientSetting("navigatorLayout", setting);
- }}
- >
- {labels[setting]}
- </DropdownMenuCheckboxItem>
- ))}
+ <DropdownMenuCheckboxItem
+ checked={clientSettings.navigatorLayout === "detached"}
+ css={menuItemCss}
+ onSelect={() => {
+ const setting =
+ clientSettings.navigatorLayout === "detached"
+ ? "attached"
+ : "detached";
+ setClientSetting("navigatorLayout", setting);
+ }}
+ >
+ Show navigator
+ </DropdownMenuCheckboxItem>
</DropdownMenuContent>
</DropdownMenu>
);