Bereaksi router dom 6 kembali

import { useNavigate } from "react-router-dom";
const navigate = useNavigate();
navigate(-1);
CodePadding