Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation errors. SeeAllLink button not visible on mobile. #36

Open
ivanvera-nvm opened this issue Nov 14, 2022 · 0 comments
Open

Navigation errors. SeeAllLink button not visible on mobile. #36

ivanvera-nvm opened this issue Nov 14, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ivanvera-nvm
Copy link

To Reproduce
Steps to reproduce the behavior:

Bug 1:

  1. Click on mega-menu trigger button.
  2. When open, navigate to some department (normal link)
  3. Then, navigate again. The next search will break when click on the "See All" button.

Bug 2:

  1. Go to mobile version
  2. On the first level, the "See all" button does not render.

Expected behavior

Bug 1:
Expected a correct navigation without slug concatenation.

Bug 2:
The "see all" button should render. [email protected] has it.

To solve

Just a few lines of code needed:

File: /components/Submenu.tsx (Fix the navigation problem)

Before:

<Link
          id="SLUG_SEE_ALL"
          to={to}
          className={classNames(
            handles.seeAllLink,
            'link underline fw7 c-on-base'
          )}
          onClick={() => {
            if (closeMenu) closeMenu(false)
          }}
        >
          {formatIOMessage({ id: messages.seeAllTitle.id, intl })}
        </Link>

After:

<Link
          id="SLUG_SEE_ALL"
          to={`/${to}`}
          className={classNames(
            handles.seeAllLink,
            'link underline fw7 c-on-base'
          )}
          onClick={() => {
            if (closeMenu) closeMenu(false)
          }}
        >
          {formatIOMessage({ id: messages.seeAllTitle.id, intl })}
        </Link>

File: /components/Submenu.tsx

Before:
// {showBtnCat ? seeAllLink(departmentActive.slug) : <div />}

After:
{showBtnCat ? seeAllLink(departmentActive.slug) : <div />}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant