-
Dentiste.-.Prendre.rendez-vous.pour.une.consultation.medicale.sur.Freedocteur.Brave.2023-04-01.10-15-40.mp4Hello 👋, I'm using useNavigate to navigate between pages on my website, but I'm having some redirection issues with query parameters. I have a const navigate = useNavigate() variable and I called navigate('/allergioloque/') to go to another page. However, when I'm on the /dentiste?page=2 page and I use navigate('/allergioloque/'), I'm not redirected to the /allergioloque page. On the other hand, when I'm on the /dentiste page without any query parameters, the redirection works correctly. I'm wondering if this is due to the functioning of useNavigate or if I'm not using it correctly. If anyone has any idea of what's going on, I would be very grateful for any help. Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, I just wanted to update this discussion to indicate that I have found the solution to my problem. It turns out that the problem was not related to the use of useNavigate 😅, but rather to code in my onchange input that was making a fetch every time I selected an item. I solved the problem by modifying the code in my input.🙂 |
Beta Was this translation helpful? Give feedback.
Hi,
I just wanted to update this discussion to indicate that I have found the solution to my problem. It turns out that the problem was not related to the use of useNavigate 😅, but rather to code in my onchange input that was making a fetch every time I selected an item. I solved the problem by modifying the code in my input.🙂