-2

On this Image, you can see I made some data to be passed on.

NavbarData.js

And i passed it by using the .map function and populate it on the to={} property

Navbar.js

Im getting this error

"Uncaught TypeError: Cannot read properties of undefined (reading 'pathname')"

even though i passed the data on the to={} property

Error

You can check this snippet for reference.

Styled Components

PAUL
  • 85
  • 8
  • Navbar.js file shows a stylesheet – Pulsara Sandeepa Jan 29 '22 at 14:41
  • @PulsaraSandeepa It is a styled components. – PAUL Jan 29 '22 at 14:45
  • Hi @JohnPaulPineda, welcome to SO, to help you with your problem or future questions please consider sharing your code into code snippets instead of images, please check [Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question/285557#285557) – Jose Lora Feb 08 '22 at 13:16

1 Answers1

-1

I forgot to pass the to={} property on the react-router-dom Link

PAUL
  • 85
  • 8