Feat: Migrate Hardcoded Strings

This commit is contained in:
Br0wnHammer committed 2025-03-17 01:16:42 +05:30
1 parent b6113a176f
commit cdbabeb225
30 files changed
+334 -187

No files matched your search

@@ -4,20 +4,22 @@ import { useNavigate } from "react-router-dom";
import { StatusLabel } from "../../../../../Components/Label";
import ArrowOutwardIcon from "@mui/icons-material/ArrowOutward";
import { Stack, Typography } from "@mui/material";
import { useTranslation } from "react-i18next";
const StatusPagesTable = ({ data }) => {
const theme = useTheme();
const { t } = useTranslation();
const navigate = useNavigate();
const headers = [
{
id: "name",
content: "Status page name",
content: t("statusPageName"),
render: (row) => {
return row.companyName;
},
},
{
id: "url",
content: "Public URL",
content: t("publicURL"),
onClick: (e, row) => {
if (row.isPublished) {
e.stopPropagation();
@@ -57,14 +59,14 @@ const StatusPagesTable = ({ data }) => {
},
{
id: "type",
content: "Type",
content: t("type"),
render: (row) => {
return row.type;
},
},
{
id: "status",
content: "Status",
content: t("status"),
render: (row) => {
const status = row.isPublished ? "published" : "unpublished";
return (
+4 -2
View File
@@ -8,6 +8,7 @@ import StatusPagesTable from "./Components/StatusPagesTable";
import SkeletonLayout from "../../../Components/Skeletons/FullPage";
// Utils
import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next";
import { useStatusPagesFetch } from "./Hooks/useStatusPagesFetch";
import { useIsAdmin } from "../../../Hooks/useIsAdmin";
const BREADCRUMBS = [{ name: `Status Pages`, path: "" }];
@@ -15,6 +16,7 @@ const BREADCRUMBS = [{ name: `Status Pages`, path: "" }];
const StatusPages = () => {
// Utils
const theme = useTheme();
const { t } = useTranslation();
const isAdmin = useIsAdmin();
const [isLoading, networkError, statusPages] = useStatusPagesFetch();
@@ -30,9 +32,9 @@ const StatusPages = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
Network error
{t("networkError")}
</Typography>
<Typography>Please check your connection</Typography>
<Typography>{t("checkConnection")}</Typography>
</GenericFallback>
);
}