fix: add PropTypes values

This commit is contained in:
Renato committed 2025-03-09 09:50:05 +01:00
1 parent d05821e95e
commit 85e899b7db
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -128,6 +128,8 @@ const statusToTheme = {
paused: "warning", paused: "warning",
pending: "warning", pending: "warning",
"cannot resolve": "error", "cannot resolve": "error",
published: "success",
unpublished: "error",
}; };
const StatusLabel = ({ status, text, customStyles }) => { const StatusLabel = ({ status, text, customStyles }) => {
@@ -156,7 +158,7 @@ const StatusLabel = ({ status, text, customStyles }) => {
}; };
StatusLabel.propTypes = { StatusLabel.propTypes = {
status: PropTypes.oneOf(["up", "down", "paused", "pending", "cannot resolve"]), status: PropTypes.oneOf(["up", "down", "paused", "pending", "cannot resolve", "published", "unpublished"]),
text: PropTypes.string, text: PropTypes.string,
customStyles: PropTypes.object, customStyles: PropTypes.object,
}; };
@@ -66,7 +66,7 @@ const StatusPagesTable = ({ data }) => {
id: "status", id: "status",
content: "Status", content: "Status",
render: (row) => { render: (row) => {
const status = row.isPublished ? "up" : "down"; const status = row.isPublished ? "published" : "unpublished";
return ( return (
<StatusLabel <StatusLabel
status={status} status={status}