From 0fa3a8c3e33d381e30efd98f60fd5de3fbc7b329 Mon Sep 17 00:00:00 2001 From: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com> Date: Mon, 17 Apr 2023 18:38:07 +0530 Subject: [PATCH] fix: removed useEffect for project detail fetch error (#860) --- 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 c18890311..477c82587 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,