Navigation error
Unanswered
Sun bear posted this in #help-forum
Sun bearOP
Oh, whoops. Well the question is simple:
I have a few lines of code which give the error in the screenshot. It's related to navigation (I'm using Routing).
I just need to know why that is and what to do about it.
import { useNavigation } from 'next/navigation';
import RecruiterDashboard from '../../components/RecruiterDashboard';
export default function TestPage() {
const { back } = useNavigation();
return (
<div className="flex flex-col items-center justify-center h-screen">
<RecruiterDashboard />
<button
className="mt-4 p-2 text-white bg-blue-500 rounded"
onClick={() => back()}
>
Go Back
</button>
</div>
);
}I have a few lines of code which give the error in the screenshot. It's related to navigation (I'm using Routing).
I just need to know why that is and what to do about it.
1 Reply
Sun bearOP
Solved