forked from github/plane
chore: handled multiple children rendering in the space layout (#4459)
This commit is contained in:
parent
751a4a3b21
commit
e1197f2b8f
@ -17,11 +17,10 @@ export default function InstanceError() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="relative h-screen overflow-x-hidden overflow-y-auto container px-5 mx-auto flex justify-center items-center">
|
||||||
<div className="h-full w-full relative container px-5 mx-auto flex justify-center items-center mt-10">
|
|
||||||
<div className="w-auto max-w-2xl relative space-y-8 py-10">
|
<div className="w-auto max-w-2xl relative space-y-8 py-10">
|
||||||
<div className="relative flex flex-col justify-center items-center space-y-4">
|
<div className="relative flex flex-col justify-center items-center space-y-4">
|
||||||
<Image src={instanceImage} alt="Plane Logo" />
|
<Image src={instanceImage} alt="Plane instance failure image" />
|
||||||
<h3 className="font-medium text-2xl text-white ">Unable to fetch instance details.</h3>
|
<h3 className="font-medium text-2xl text-white ">Unable to fetch instance details.</h3>
|
||||||
<p className="font-medium text-base text-center">
|
<p className="font-medium text-base text-center">
|
||||||
We were unable to fetch the details of the instance. <br />
|
We were unable to fetch the details of the instance. <br />
|
||||||
@ -35,6 +34,5 @@ export default function InstanceError() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -46,8 +46,6 @@ export default async function RootLayout({ children }: { children: React.ReactNo
|
|||||||
) : (
|
) : (
|
||||||
<>{instanceDetails.instance.is_setup_done ? <>{children}</> : <InstanceNotReady />}</>
|
<>{instanceDetails.instance.is_setup_done ? <>{children}</> : <InstanceNotReady />}</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{children}
|
|
||||||
</AppProvider>
|
</AppProvider>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
// assets
|
// assets
|
||||||
import UserLoggedInImage from "public/user-logged-in.svg";
|
import UserLoggedInImage from "public/user-logged-in.svg";
|
||||||
|
|
||||||
export default function InstanceNotFound() {
|
export default function InstanceNotFound() {
|
||||||
return (
|
return (
|
||||||
<div>
|
|
||||||
<div className="flex h-screen w-screen flex-col">
|
<div className="flex h-screen w-screen flex-col">
|
||||||
<div className="grid h-full w-full place-items-center p-6">
|
<div className="grid h-full w-full place-items-center p-6">
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
@ -19,6 +19,5 @@ export default function InstanceNotFound() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
@ -7,11 +8,7 @@ import { Button } from "@plane/ui";
|
|||||||
import InstanceFailureDarkImage from "public/instance/instance-failure-dark.svg";
|
import InstanceFailureDarkImage from "public/instance/instance-failure-dark.svg";
|
||||||
import InstanceFailureImage from "public/instance/instance-failure.svg";
|
import InstanceFailureImage from "public/instance/instance-failure.svg";
|
||||||
|
|
||||||
type InstanceFailureViewProps = {
|
export const InstanceFailureView: FC = () => {
|
||||||
// mutate: () => void;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const InstanceFailureView: FC<InstanceFailureViewProps> = () => {
|
|
||||||
const { resolvedTheme } = useTheme();
|
const { resolvedTheme } = useTheme();
|
||||||
|
|
||||||
const instanceImage = resolvedTheme === "dark" ? InstanceFailureDarkImage : InstanceFailureImage;
|
const instanceImage = resolvedTheme === "dark" ? InstanceFailureDarkImage : InstanceFailureImage;
|
||||||
@ -21,10 +18,10 @@ export const InstanceFailureView: FC<InstanceFailureViewProps> = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-full w-full relative container px-5 mx-auto flex justify-center items-center mt-10">
|
<div className="relative h-screen overflow-x-hidden overflow-y-auto container px-5 mx-auto flex justify-center items-center">
|
||||||
<div className="w-auto max-w-2xl relative space-y-8 py-10">
|
<div className="w-auto max-w-2xl relative space-y-8 py-10">
|
||||||
<div className="relative flex flex-col justify-center items-center space-y-4">
|
<div className="relative flex flex-col justify-center items-center space-y-4">
|
||||||
<Image src={instanceImage} alt="Plane Logo" />
|
<Image src={instanceImage} alt="Plane instance failure image" />
|
||||||
<h3 className="font-medium text-2xl text-white ">Unable to fetch instance details.</h3>
|
<h3 className="font-medium text-2xl text-white ">Unable to fetch instance details.</h3>
|
||||||
<p className="font-medium text-base text-center">
|
<p className="font-medium text-base text-center">
|
||||||
We were unable to fetch the details of the instance. <br />
|
We were unable to fetch the details of the instance. <br />
|
||||||
|
@ -5,9 +5,10 @@ import { IUser } from "@plane/types";
|
|||||||
// services
|
// services
|
||||||
import { AuthService } from "@/services/auth.service";
|
import { AuthService } from "@/services/auth.service";
|
||||||
import { UserService } from "@/services/user.service";
|
import { UserService } from "@/services/user.service";
|
||||||
// stores
|
// store types
|
||||||
import { RootStore } from "@/store/root.store";
|
|
||||||
import { ProfileStore, IProfileStore } from "@/store/profile.store";
|
import { ProfileStore, IProfileStore } from "@/store/profile.store";
|
||||||
|
import { RootStore } from "@/store/root.store";
|
||||||
|
// types
|
||||||
import { ActorDetail } from "@/types/issue";
|
import { ActorDetail } from "@/types/issue";
|
||||||
|
|
||||||
type TUserErrorStatus = {
|
type TUserErrorStatus = {
|
||||||
|
Loading…
Reference in New Issue
Block a user