mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 01:01:49 +10:00
refactor: redirect using useRouter
This commit is contained in:
committed by
Mythie
parent
c43843d226
commit
57ff77b920
@ -2,10 +2,14 @@
|
||||
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
export default function Redirect() {
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
const timer = setTimeout(() => {
|
||||
window.location.href = 'https://www.documenso.com';
|
||||
router.push('/');
|
||||
}, 3000);
|
||||
|
||||
return () => clearTimeout(timer);
|
||||
|
||||
Reference in New Issue
Block a user