adrianhajdin/project_music_player

UX issue on sidebar nav clicks.

Newbie814 opened this issue · 0 comments

On mobile view, when I click on an item in the sidebar menu, it appears nothing happens. It actually does update the info on the page, but you have to scroll down to it. There is no indication that anything has changed, unless you just happen to know it's supposed to. I would expect it to either open a standalone page, or scroll down to the correct section. The same behavior shows when cloning the original depo here. There is a handleClick function in the page, but it doesn't seem to have any instructions.

How could I resolve this issue?

const NavLinks = ({ handleClick }) => (
  <div className='mt-10'>
    {links.map((item) => (
      <NavLink
        key={item.name}
        to={item.to}
        className='flex flex-row justify-start items-center my-8 text-sm font-medium text-gray-400 hover:text-cyan-400'
        onClick={() => handleClick && handleClick()}
      >
        <item.icon className='w-6 h-6 mr-2' />
        {item.name}
      </NavLink>
    ))}
  </div>