Skip to content

Commit

Permalink
nav menu bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ceddybi committed Mar 28, 2024
1 parent 1624ed4 commit aeb5f1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/html/store/ads/[slug]/adedit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from 'react';
import type { AdsEditorProps } from '@/containers/AdEditor/adeditor.html';
import AdsEditorHtml from '@/containers/AdEditor/adeditor.html';

const AdEditorPage = async (props: AdsEditorProps) => {
const AdEditorPage = (props: AdsEditorProps) => {
return (
<Layout display={Display.Flex} fullWidth>
<AdsEditorHtml {...props} />
Expand Down
8 changes: 6 additions & 2 deletions src/components/sidebarHTML/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ export const VerticalSideBar = ({

const pathnames = pathname.split('/');

// eslint-disable-next-line react/no-unstable-nested-components
const NavItem = (item: IMenu) => {
const menuItems = item.menu as MenuItemProps[];
const slugend = item.slug.split('/').pop();
const slugend = item.slug.split('/').pop() || '';
const isOpened = pathnames.includes(slugend);

return (
Expand Down Expand Up @@ -153,7 +154,10 @@ export const VerticalSideBar = ({
>
{menuItems.map((subitem) => {
return (
<Link href={subitem?.slug || ''} key={item.slug}>
<Link
href={subitem?.slug || ''}
key={subitem.slug}
>
<StyledSubMenuItem id={subitem.slug}>
<VerticalNavigationItem
selected={subitem.slug === pathname}
Expand Down

0 comments on commit aeb5f1d

Please sign in to comment.