next router not working [FIXED]
Answered
Auth posted this in #help-forum
![Avatar](https://cdn.discordapp.com/avatars/1045909242101633126/f0010aca6758b8e1ffd6ff7184343d54.webp?size=256)
AuthOP
so i have this code it sends some data to backend but i wanna redirect user after clicking on the button im using next router but i get error in console next router not mounted
Answered by Dayo
since you're using the app router you ought to import
router
from next/navigation
instead of next/router
5 Replies
![Avatar](https://cdn.discordapp.com/avatars/1045909242101633126/f0010aca6758b8e1ffd6ff7184343d54.webp?size=256)
AuthOP
![Avatar](https://cdn.discordapp.com/avatars/1045909242101633126/f0010aca6758b8e1ffd6ff7184343d54.webp?size=256)
@Auth Click to see attachment
![Avatar](https://cdn.discordapp.com/avatars/694749037160824902/95960a6c36e52e168a16b7f6543b819f.webp?size=256)
since you're using the app router you ought to import
router
from next/navigation
instead of next/router
Answer
THANKSSS SOO MUCHH
![Avatar](https://cdn.discordapp.com/avatars/1045909242101633126/f0010aca6758b8e1ffd6ff7184343d54.webp?size=256)
@Auth THANKSSS SOO MUCHH
![Avatar](https://cdn.discordapp.com/avatars/694749037160824902/95960a6c36e52e168a16b7f6543b819f.webp?size=256)
awesome! no worries!