Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/dashboard/src/org-admin/MaintenanceModeBanner.tsx
2499 views
1
/**
2
* Copyright (c) 2025 Gitpod GmbH. All rights reserved.
3
* Licensed under the GNU Affero General Public License (AGPL).
4
* See License.AGPL.txt in the project root for license information.
5
*/
6
7
import { FC } from "react";
8
import Alert from "../components/Alert";
9
import { useMaintenanceMode } from "../data/maintenance-mode/maintenance-mode-query";
10
11
export const MaintenanceModeBanner: FC = () => {
12
const { isMaintenanceMode } = useMaintenanceMode();
13
14
if (!isMaintenanceMode) {
15
return null;
16
}
17
18
return (
19
<Alert type="warning" className="mb-2">
20
<div className="flex items-center flex-wrap gap-2">
21
<span className="font-semibold">System is in maintenance mode.</span>
22
<span>Starting new workspaces is currently disabled by your organization owner.</span>
23
</div>
24
</Alert>
25
);
26
};
27
28