From a1d22affaeb7e661d5565b84c24e22dc602ca8c2 Mon Sep 17 00:00:00 2001 From: Dakshesh Jain Date: Mon, 17 Apr 2023 18:35:26 +0530 Subject: [PATCH] fix: removed useEffect for project detail fetch error --- apps/app/hooks/use-project-details.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/apps/app/hooks/use-project-details.tsx b/apps/app/hooks/use-project-details.tsx index c1889031196..477c82587a0 100644 --- a/apps/app/hooks/use-project-details.tsx +++ b/apps/app/hooks/use-project-details.tsx @@ -1,5 +1,3 @@ -import { useEffect } from "react"; - import { useRouter } from "next/router"; import useSWR from "swr"; @@ -24,14 +22,6 @@ const useProjectDetails = () => { : null ); - useEffect(() => { - if (projectDetailsError?.status === 404) { - router.push("/404"); - } else if (projectDetailsError) { - router.push("/error"); - } - }, [projectDetailsError, router]); - return { projectDetails, projectDetailsError,