2024-05-14 08:56:54 +00:00
|
|
|
"use client";
|
2024-05-15 10:58:38 +00:00
|
|
|
|
2024-05-10 14:04:40 +00:00
|
|
|
import { FC } from "react";
|
|
|
|
import Image from "next/image";
|
|
|
|
import { useTheme } from "next-themes";
|
|
|
|
import { Button } from "@plane/ui";
|
|
|
|
// assets
|
|
|
|
import InstanceFailureDarkImage from "public/instance/instance-failure-dark.svg";
|
|
|
|
import InstanceFailureImage from "public/instance/instance-failure.svg";
|
|
|
|
|
2024-05-15 10:58:38 +00:00
|
|
|
export const InstanceFailureView: FC = () => {
|
2024-05-10 14:04:40 +00:00
|
|
|
const { resolvedTheme } = useTheme();
|
|
|
|
|
|
|
|
const instanceImage = resolvedTheme === "dark" ? InstanceFailureDarkImage : InstanceFailureImage;
|
|
|
|
|
2024-05-14 08:56:54 +00:00
|
|
|
const handleRetry = () => {
|
|
|
|
window.location.reload();
|
|
|
|
};
|
|
|
|
|
2024-05-10 14:04:40 +00:00
|
|
|
return (
|
2024-05-15 10:58:38 +00:00
|
|
|
<div className="relative h-screen overflow-x-hidden overflow-y-auto container px-5 mx-auto flex justify-center items-center">
|
2024-05-10 14:04:40 +00:00
|
|
|
<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">
|
2024-05-15 10:58:38 +00:00
|
|
|
<Image src={instanceImage} alt="Plane instance failure image" />
|
2024-05-10 14:04:40 +00:00
|
|
|
<h3 className="font-medium text-2xl text-white ">Unable to fetch instance details.</h3>
|
|
|
|
<p className="font-medium text-base text-center">
|
|
|
|
We were unable to fetch the details of the instance. <br />
|
|
|
|
Fret not, it might just be a connectivity issue.
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div className="flex justify-center">
|
2024-05-14 08:56:54 +00:00
|
|
|
<Button size="md" onClick={handleRetry}>
|
2024-05-10 14:04:40 +00:00
|
|
|
Retry
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|