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()
|
const router = useRouter()
|
||||||
|
|
||||||
function callback(path: string) {
|
function callback(path: string) {
|
||||||
// This is scuffed, how do we do this natively?
|
router.push(path, undefined, { shallow: true })
|
||||||
window.history.replaceState(null, `Grid Tool`, `${path}`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue