Skip to content

The Open Source DocuSign Alternative.

refactor: redirect using useRouter

Ephraim Atta-Duncan57ff77b920f9
diff --git a/apps/web/src/app/(share)/share/[shareId]/redirect.tsx b/apps/web/src/app/(share)/share/[shareId]/redirect.tsx
index 6846975cb..f64095608 100644
--- a/apps/web/src/app/(share)/share/[shareId]/redirect.tsx
+++ b/apps/web/src/app/(share)/share/[shareId]/redirect.tsx
@@ -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);