Skip to content

Commit f6bcaec

Browse files
fix navbar menu issue in mobile layout
1 parent 51072c9 commit f6bcaec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/features/navbar/Navbar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ function NavBar({ children }) {
208208
{userNavigation.map((item) => (
209209
<Disclosure.Button
210210
key={item.name}
211-
as="a"
212-
href={item.href}
211+
as={Link} // change as=a to as=Link to use Disclosure.Button as a Link (react-router-dom)
212+
to={item.link} // {link: "/orders"}
213213
className="block rounded-md px-3 py-2 text-base font-medium text-gray-400 hover:bg-gray-700 hover:text-white"
214214
>
215215
{item.name}

0 commit comments

Comments
 (0)