fix: add <StatusLabel> on "status pages" table
This commit is contained in:
1 parent
483699e2b7
commit
d05821e95e
1 file changed
+5
-6
@@ -1,7 +1,7 @@
|
|||||||
import DataTable from "../../../../../Components/Table";
|
import DataTable from "../../../../../Components/Table";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { ColoredLabel } from "../../../../../Components/Label";
|
import { StatusLabel } from "../../../../../Components/Label";
|
||||||
import ArrowOutwardIcon from "@mui/icons-material/ArrowOutward";
|
import ArrowOutwardIcon from "@mui/icons-material/ArrowOutward";
|
||||||
import { Stack, Typography } from "@mui/material";
|
import { Stack, Typography } from "@mui/material";
|
||||||
const StatusPagesTable = ({ data }) => {
|
const StatusPagesTable = ({ data }) => {
|
||||||
@@ -66,12 +66,11 @@ const StatusPagesTable = ({ data }) => {
|
|||||||
id: "status",
|
id: "status",
|
||||||
content: "Status",
|
content: "Status",
|
||||||
render: (row) => {
|
render: (row) => {
|
||||||
|
const status = row.isPublished ? "up" : "down";
|
||||||
return (
|
return (
|
||||||
<ColoredLabel
|
<StatusLabel
|
||||||
label={row.isPublished ? "Published" : "Unpublished"}
|
status={status}
|
||||||
color={
|
text={row.isPublished ? "Published" : "Unpublished"}
|
||||||
row.isPublished ? theme.palette.success.main : theme.palette.warning.main
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user