Users should be provided functionality to go back to the home page from the dashboard as the home page contains various information about the resources.
Approach
In src/pages/dashboard.jsx we have to add a button with "Back to Home".
I was trying to solve this issue locally but "next/router" was not working instead error statement was suggesting me to use "next/navigation" but as I was trying "redirect()" inside a client-side React component. This is not permitted in Next.js, as server-side functions should be handled on the server and not in the client components. I also tried using the "handleClick" function separately but the problem continued.
So the way to solve is either to make a separate component or using Link instead of button.
Additional Information:
*I tried using anchor tag and solved the issue but it is not a conventional way of doing that. So I rejected the idea.
Description
Users should be provided functionality to go back to the home page from the dashboard as the home page contains various information about the resources.
Approach
In src/pages/dashboard.jsx we have to add a button with "Back to Home".
Additional Information:
*I tried using anchor tag and solved the issue but it is not a conventional way of doing that. So I rejected the idea.
Here is how it looked like