404 error when adding wordpress menu to api

Hello :blush:

Iā€™ve just watched @mburridge 's video about adding the WordPress menu to the api and am having a few issues. When I see if Iā€™ve managed to ā€œinsertā€ the menu into the api it gives me a 404 error saying the following:

But when I check the json object like Michael did then I can see that the ā€œnavbar-menuā€ exists in the api endpoint for the menus:

Hereā€™s my code for the menu handler:

index.js where I add the menuUrl and the fetch:

and finally the nav.js where I connect to the state:

Here is the URL of my WP rest API http://127.0.0.1:10080/wordpress/wp-json/menus/v1/menus/

Iā€™ve had a look in some of the other threads where people are having trouble accessing the menu and canā€™t find anything that would help me. So Iā€™d be grateful for an extra set of eyes on my code etc :sun_with_face:

Many thanks in advance!
Claire.

Hie @clairecaudwell

Can you please provide a repo or code-sandbox with your code? This is especially helpful to find solutions to technical issues with specific code

Detailing the info suggested here when having issues will help the community to provide the best possible help as quickly and as efficiently as possible.

As this is a local URL Iā€™m afraid this is not helpful for the community to try to replicate and understand your issue

Hello @juanma

Yes sorry about that, I realised that afterwards that this wouldnā€™t help. Apologies. Iā€™m a junior developer and this is my first time working with WordPress. So thank you for your patience!

Hereā€™s my github repo GitHub - ClaireCaudwell/claire-nkjt-site

@juanma Me and my colleague managed to solve the issue. I hadnā€™t put the source handlers inside the libraries section in index.js. Sorry about that and thanks for your help!