show offline overlay for maintenance
This commit is contained in:
parent
c86fe77d16
commit
b53a1ddefb
|
@ -11,8 +11,9 @@ export interface MBOProps {
|
|||
}
|
||||
|
||||
export function MustBeOnline({ children, hideBanner, lockOpen, status }: MBOProps) {
|
||||
const banner = !hideBanner ? "banner" : "";
|
||||
if (lockOpen || (status && (status !== "unknown"))) {
|
||||
const banner = hideBanner ? "" : "banner";
|
||||
const online = status && !["unknown", "maintenance"].includes(status);
|
||||
if (online || lockOpen) {
|
||||
return <div> {children} </div>;
|
||||
} else {
|
||||
return <div className={`unavailable ${banner}`}> {children} </div>;
|
||||
|
|
Loading…
Reference in a new issue