step1: add function while button click
step2: put routing inside function
const handleRedirect = () => {
navigate("/review_report")
};
step3: import class
import { useNavigate } from "react-router-dom"
step4: define navigate
const navigate = useNavigate()
step5: mention route
<Route path="review_report" element={<ReviewReport />} />
output
Top comments (0)