fix(web): убрать MenuGroupLabel из App Switcher
Build, Test, and Push CFDM Docker Image / test (push) Successful in 3m35s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Successful in 2m20s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 6s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped

Заголовок меню — обычный div вместо DropdownMenuLabel, чтобы исключить Base UI error #31 в production.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-06-30 15:45:45 +07:00
co-authored by Cursor
parent e47395544e
commit cc829a5a8e
+25 -29
View File
@@ -1,9 +1,7 @@
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuShortcut,
DropdownMenuTrigger,
} from '@cfdm/ui/components/dropdown-menu'
@@ -59,39 +57,37 @@ export function AppSwitcher() {
align="start"
sideOffset={4}
>
<DropdownMenuGroup>
<DropdownMenuLabel className="text-xs text-muted-foreground">
{config.menuLabel}
</DropdownMenuLabel>
{config.apps.map((app) => {
const Icon = APP_SWITCHER_ICONS[app.icon]
const isCurrent = app.id === CURRENT_APP_ID
if (isCurrent) {
return (
<DropdownMenuItem key={app.id} disabled>
<Icon />
{app.name}
<CheckIcon className="ml-auto size-4" />
</DropdownMenuItem>
)
}
<div className="px-2 py-1.5 text-xs text-muted-foreground">
{config.menuLabel}
</div>
{config.apps.map((app) => {
const Icon = APP_SWITCHER_ICONS[app.icon]
const isCurrent = app.id === CURRENT_APP_ID
if (isCurrent) {
return (
<DropdownMenuItem
key={app.id}
nativeButton={false}
render={<a href={app.url} />}
>
<DropdownMenuItem key={app.id} disabled>
<Icon />
{app.name}
{app.shortcut ? (
<DropdownMenuShortcut>{app.shortcut}</DropdownMenuShortcut>
) : null}
<CheckIcon className="ml-auto size-4" />
</DropdownMenuItem>
)
})}
</DropdownMenuGroup>
}
return (
<DropdownMenuItem
key={app.id}
nativeButton={false}
render={<a href={app.url} />}
>
<Icon />
{app.name}
{app.shortcut ? (
<DropdownMenuShortcut>{app.shortcut}</DropdownMenuShortcut>
) : null}
</DropdownMenuItem>
)
})}
</DropdownMenuContent>
</DropdownMenu>
</SidebarMenuItem>