diff --git a/frontend-next-migration/src/app/[lng]/(helper)/hero-development/layout.tsx b/frontend-next-migration/src/app/[lng]/(helper)/hero-development/layout.tsx index 3b5f748aa..dd8375579 100644 --- a/frontend-next-migration/src/app/[lng]/(helper)/hero-development/layout.tsx +++ b/frontend-next-migration/src/app/[lng]/(helper)/hero-development/layout.tsx @@ -1,6 +1,6 @@ import { ReactNode } from 'react'; import { LayoutWithSidebars } from '@/preparedPages/Layouts'; -import { HeroDevelopmentSidebar } from '@/features/NavigateHeroes'; +import { HeroDevelopmentNavMenuAsDropdown } from '@/features/NavigateHeroes'; type Props = { children: ReactNode; @@ -10,7 +10,7 @@ export default function HeroDevelopmentLayout({ children }: Props) { return ( , + component: , }} > {children} diff --git a/frontend-next-migration/src/features/NavigateHeroes/ui/HeroDevelopmentNavMenuAsDropdown.module.scss b/frontend-next-migration/src/features/NavigateHeroes/ui/HeroDevelopmentNavMenuAsDropdown.module.scss index 2a8d40bc8..aaef74e73 100644 --- a/frontend-next-migration/src/features/NavigateHeroes/ui/HeroDevelopmentNavMenuAsDropdown.module.scss +++ b/frontend-next-migration/src/features/NavigateHeroes/ui/HeroDevelopmentNavMenuAsDropdown.module.scss @@ -1,3 +1,4 @@ .Width { width: 100%; + min-width: 250px; } \ No newline at end of file diff --git a/frontend-next-migration/src/features/NavigateHeroes/ui/HeroDevelopmentNavMenuAsDropdown.tsx b/frontend-next-migration/src/features/NavigateHeroes/ui/HeroDevelopmentNavMenuAsDropdown.tsx index daaac5583..6c858b1b9 100644 --- a/frontend-next-migration/src/features/NavigateHeroes/ui/HeroDevelopmentNavMenuAsDropdown.tsx +++ b/frontend-next-migration/src/features/NavigateHeroes/ui/HeroDevelopmentNavMenuAsDropdown.tsx @@ -7,11 +7,14 @@ import { NavMenuWithDropdowns, NavMenuWithDropdownsProps, DropdownItem, -} from '@/shared/ui/NavMenuWithDropdowns'; +} from '@/shared/ui/NavMenuWithDropdownsV2'; import { getRouteOneHeroDevPage } from '@/shared/appLinks/RoutePaths'; import { useClientTranslation } from '@/shared/i18n'; +import useSizes from '@/shared/lib/hooks/useSizes'; const HeroDevelopmentNavMenuAsDropdown: React.FC = () => { + const { isMobileSize, isTabletSize } = useSizes(); + const isTouchDevice = isMobileSize || isTabletSize; const { t } = useClientTranslation('heroes'); const pathname = usePathname(); const selectedHero = pathname.split('/')[3]; @@ -20,7 +23,7 @@ const HeroDevelopmentNavMenuAsDropdown: React.FC = () => { const allHeroGroups = heroManager.getGroupsWithHeroesAsArray(); const dropdownItems: DropdownItem[] = allHeroGroups.map((group) => ({ - title: group.name, + title: group.name.charAt(0) + group.name.slice(1).toLowerCase(), openByDefault: false, elements: group.heroes.map((hero) => ({ elementText: hero.title, @@ -30,17 +33,34 @@ const HeroDevelopmentNavMenuAsDropdown: React.FC = () => { })), })); - const navMenuWithDropdownsProps: NavMenuWithDropdownsProps = { + const navMenuWithDropdownsMobileProps: NavMenuWithDropdownsProps = { title: t('section-title'), openByDefault: false, dropdownItems: dropdownItems, }; + const navMenuWithDropdownsDesktopProps: NavMenuWithDropdownsProps = { + title: t('section-title'), + openByDefault: true, + staticDropdown: true, + dropdownItems: dropdownItems, + }; + return ( - +
+ + +
); }; diff --git a/frontend-next-migration/src/preparedPages/Layouts/ui/LayoutWithSidebars/LayoutWithSidebars.module.scss b/frontend-next-migration/src/preparedPages/Layouts/ui/LayoutWithSidebars/LayoutWithSidebars.module.scss index f6d711174..4ded67e8c 100644 --- a/frontend-next-migration/src/preparedPages/Layouts/ui/LayoutWithSidebars/LayoutWithSidebars.module.scss +++ b/frontend-next-migration/src/preparedPages/Layouts/ui/LayoutWithSidebars/LayoutWithSidebars.module.scss @@ -26,7 +26,7 @@ $touchSize: 1023px; top: $navbar-height; height: calc(100vh - #{$navbar-height}); flex-shrink: 0; - min-width: 220px; + min-width: 250px; flex-basis: 20%; overflow-y: auto; padding-left: 20px; diff --git a/frontend-next-migration/src/preparedPages/Layouts/ui/LayoutWithSidebars/LayoutWithSidebars.tsx b/frontend-next-migration/src/preparedPages/Layouts/ui/LayoutWithSidebars/LayoutWithSidebars.tsx index 2102e3494..d716669d7 100644 --- a/frontend-next-migration/src/preparedPages/Layouts/ui/LayoutWithSidebars/LayoutWithSidebars.tsx +++ b/frontend-next-migration/src/preparedPages/Layouts/ui/LayoutWithSidebars/LayoutWithSidebars.tsx @@ -60,7 +60,7 @@ const LayoutWithSidebars = (props: DesktopLeftSidebarLayoutProps) => { {leftTopSidebar && (