Replace native JS redirect with useRouter

This commit is contained in:
Justin Edmund 2023-01-28 23:15:44 -08:00
parent 4e6fb19fb0
commit 71c9d5a744

View file

@ -35,8 +35,7 @@ const NewRoute: React.FC<Props> = ({
const router = useRouter()
function callback(path: string) {
// This is scuffed, how do we do this natively?
window.history.replaceState(null, `Grid Tool`, `${path}`)
router.push(path, undefined, { shallow: true })
}
useEffect(() => {