mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: removed useEffect for project detail fetch error (#860)
This commit is contained in:
parent
bd0cfef02f
commit
0fa3a8c3e3
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user