Next.js Discord

Discord Forum

Not able to push to the nested routes in app router 14

Unanswered
Filipino Venus posted this in #help-forum
Open in Discord
Filipino VenusOP
Hey I am trying to router.push() to nested route but it is not working, what could be the issue.
  const response = await axios.post("http://localhost:4000/admin", formData);
  console.log(response.data);
  const {accessToken} = response.data;
  localStorage.setItem('token', accessToken); 
  console.log("Admin Login Success");
  router.push("/category/shopall");  // this is the issue, it is not forwarding me to the nested route but just "/category" working fine

here is my little code
help kudasai !!!

0 Replies