Skip to content

Commit 7e6d609

Browse files
committed
Added WIP type
1 parent 51903bf commit 7e6d609

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/pages/dashboard/ContentWrapper.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Restricted from "./Restricted";
66
import StaffRestricted from "./StaffRestricted";
77
import BetaRestricted from "./BetaRestricted";
88
import ServiceNotAvailable from "./ServiceNotAvailable";
9+
import WorkInProgress from "./WorkInProgress";
910

1011
const STAFF_ROLES = [
1112
"developer",
@@ -21,6 +22,7 @@ const STAFF_ROLES = [
2122
export default function ContentWrapper({ pageName, children }) {
2223
const [loading, setLoading] = useState(true);
2324
const [available, setAvailable] = useState(false);
25+
const [type, setType] = useState("");
2426
const [serviceNotAvailable, setServiceNotAvailable] = useState(false);
2527
const [underMaintenance, setUnderMaintenance] = useState(false);
2628
const [message, setMessage] = useState("");
@@ -80,6 +82,7 @@ export default function ContentWrapper({ pageName, children }) {
8082
} else {
8183
determineRestriction(requiredRoles);
8284
}
85+
setType(data.page.content.type);
8386
setServiceNotAvailable(data?.page?.content?.service?.available);
8487
} catch {
8588
setMessage("Error checking page availability.");
@@ -99,6 +102,7 @@ export default function ContentWrapper({ pageName, children }) {
99102
if (restrictionType === "beta") return <BetaRestricted />;
100103
return <Restricted />;
101104
}
105+
if (type === "alpha") return <WorkInProgress />;
102106

103107
if (!serviceNotAvailable) {
104108
return (

0 commit comments

Comments
 (0)