Replace native JS redirect with useRouter
This commit is contained in:
parent
4e6fb19fb0
commit
71c9d5a744
1 changed files with 1 additions and 2 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue