Files
plane/apps/admin/components/instance/failure.tsx
T

46 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-01-27 13:54:22 +05:30
/**
* Copyright (c) 2023-present Plane Software, Inc. and contributors
* SPDX-License-Identifier: AGPL-3.0-only
* See the LICENSE file for details.
*/
import { observer } from "mobx-react";
2024-05-14 20:54:49 +05:30
import { useTheme } from "next-themes";
import { Button } from "@plane/propel/button";
2024-05-14 20:54:49 +05:30
// assets
import { AuthHeader } from "@/app/(all)/(home)/auth-header";
import InstanceFailureDarkImage from "@/app/assets/instance/instance-failure-dark.svg?url";
import InstanceFailureImage from "@/app/assets/instance/instance-failure.svg?url";
2024-05-14 20:54:49 +05:30
export const InstanceFailureView = observer(function InstanceFailureView() {
2024-05-14 20:54:49 +05:30
const { resolvedTheme } = useTheme();
const instanceImage = resolvedTheme === "dark" ? InstanceFailureDarkImage : InstanceFailureImage;
const handleRetry = () => {
window.location.reload();
};
return (
<>
<AuthHeader />
2026-03-02 20:40:50 +05:30
<div className="mt-10 flex w-full flex-grow flex-col items-center justify-center py-6">
<div className="relative flex w-full max-w-[22.5rem] flex-col gap-6">
<div className="relative flex flex-col items-center justify-center space-y-4">
<img src={instanceImage} alt="Instance failure illustration" />
2026-03-02 20:40:50 +05:30
<h3 className="text-center text-20 font-medium text-on-color">Unable to fetch instance details.</h3>
<p className="text-center text-14 font-medium">
We were unable to fetch the details of the instance. Fret not, it might just be a connectivity issue.
</p>
</div>
<div className="flex justify-center">
2025-12-12 20:50:14 +05:30
<Button size="lg" onClick={handleRetry}>
Retry
</Button>
</div>
2024-05-14 20:54:49 +05:30
</div>
</div>
</>
2024-05-14 20:54:49 +05:30
);
});