From e1197f2b8f7582bf4116992584775778e5c6adc6 Mon Sep 17 00:00:00 2001 From: guru_sainath Date: Wed, 15 May 2024 16:28:38 +0530 Subject: [PATCH] chore: handled multiple children rendering in the space layout (#4459) --- space/app/error.tsx | 30 +++++++++---------- space/app/layout.tsx | 2 -- space/app/not-found.tsx | 19 ++++++------ .../instance/instance-failure-view.tsx | 11 +++---- space/store/user.store.ts | 5 ++-- 5 files changed, 30 insertions(+), 37 deletions(-) diff --git a/space/app/error.tsx b/space/app/error.tsx index 5b7c6ecfb..2d6f22e90 100644 --- a/space/app/error.tsx +++ b/space/app/error.tsx @@ -17,22 +17,20 @@ export default function InstanceError() { }; return ( -
-
-
-
- Plane Logo -

Unable to fetch instance details.

-

- We were unable to fetch the details of the instance.
- Fret not, it might just be a connectivity issue. -

-
-
- -
+
+
+
+ Plane instance failure image +

Unable to fetch instance details.

+

+ We were unable to fetch the details of the instance.
+ Fret not, it might just be a connectivity issue. +

+
+
+
diff --git a/space/app/layout.tsx b/space/app/layout.tsx index cc9a94b15..c2abf44bc 100644 --- a/space/app/layout.tsx +++ b/space/app/layout.tsx @@ -46,8 +46,6 @@ export default async function RootLayout({ children }: { children: React.ReactNo ) : ( <>{instanceDetails.instance.is_setup_done ? <>{children} : } )} - - {children} diff --git a/space/app/not-found.tsx b/space/app/not-found.tsx index 2dd51630f..468f89a97 100644 --- a/space/app/not-found.tsx +++ b/space/app/not-found.tsx @@ -1,22 +1,21 @@ "use client"; + import Image from "next/image"; // assets import UserLoggedInImage from "public/user-logged-in.svg"; export default function InstanceNotFound() { return ( -
-
-
-
-
-
- User already logged in -
+
+
+
+
+
+ User already logged in
-

Not Found

-

Please enter the appropriate project URL to view the issue board.

+

Not Found

+

Please enter the appropriate project URL to view the issue board.

diff --git a/space/components/instance/instance-failure-view.tsx b/space/components/instance/instance-failure-view.tsx index 1173a6894..50f677c10 100644 --- a/space/components/instance/instance-failure-view.tsx +++ b/space/components/instance/instance-failure-view.tsx @@ -1,4 +1,5 @@ "use client"; + import { FC } from "react"; import Image from "next/image"; import { useTheme } from "next-themes"; @@ -7,11 +8,7 @@ import { Button } from "@plane/ui"; import InstanceFailureDarkImage from "public/instance/instance-failure-dark.svg"; import InstanceFailureImage from "public/instance/instance-failure.svg"; -type InstanceFailureViewProps = { - // mutate: () => void; -}; - -export const InstanceFailureView: FC = () => { +export const InstanceFailureView: FC = () => { const { resolvedTheme } = useTheme(); const instanceImage = resolvedTheme === "dark" ? InstanceFailureDarkImage : InstanceFailureImage; @@ -21,10 +18,10 @@ export const InstanceFailureView: FC = () => { }; return ( -
+
- Plane Logo + Plane instance failure image

Unable to fetch instance details.

We were unable to fetch the details of the instance.
diff --git a/space/store/user.store.ts b/space/store/user.store.ts index 2f228b629..ee376e09f 100644 --- a/space/store/user.store.ts +++ b/space/store/user.store.ts @@ -5,9 +5,10 @@ import { IUser } from "@plane/types"; // services import { AuthService } from "@/services/auth.service"; import { UserService } from "@/services/user.service"; -// stores -import { RootStore } from "@/store/root.store"; +// store types import { ProfileStore, IProfileStore } from "@/store/profile.store"; +import { RootStore } from "@/store/root.store"; +// types import { ActorDetail } from "@/types/issue"; type TUserErrorStatus = {