refactor: replace SubHeader component with a new implementation and update translations
This commit is contained in:
1 parent
9772b3b1f2
commit
30c9e518bc
5 files changed
+114
-83
No files matched your search
@@ -25,15 +25,16 @@ import { useParams } from "react-router-dom";
|
||||
import { useSubscribeToDetails } from "../../DistributedUptime/Details/Hooks/useSubscribeToDetails";
|
||||
import { useStatusPageFetchByUrl } from "./Hooks/useStatusPageFetchByUrl";
|
||||
import { useStatusPageDelete } from "../../StatusPage/Status/Hooks/useStatusPageDelete";
|
||||
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import TimeFrameHeader from "./Components/TimeframeHeader";
|
||||
import SubHeader from "../../../Components/Subheader";
|
||||
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import SubHeader from "../../DistributedUptime/Details/Components/Subheader";
|
||||
const DistributedUptimeStatus = () => {
|
||||
const { url } = useParams();
|
||||
const location = useLocation();
|
||||
const { t } = useTranslation();
|
||||
const isPublic = location.pathname.startsWith("/status/distributed/public");
|
||||
|
||||
const elementToCapture = useRef(null);
|
||||
@@ -169,23 +170,24 @@ const DistributedUptimeStatus = () => {
|
||||
elementToCapture={elementToCapture}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<SubHeader
|
||||
headerText="Real-time, real-device coverage"
|
||||
subHeaderText="Powered by millions devices worldwide, view a system performance by global region, country or city"
|
||||
rightCatagoryTitle="Monitor"
|
||||
rightDescription = "Mainnet Beta Cluster"
|
||||
headerText={t("distributedStatusHeaderText")}
|
||||
subHeaderText={t("distributedStatusSubHeaderText")}
|
||||
rightCatagoryTitle={t("distributedRightCatagoryTitle")}
|
||||
rightDescription = {t("distributedRightCatagoryDescription")}
|
||||
/>
|
||||
|
||||
<NextExpectedCheck
|
||||
lastUpdateTime={monitor?.timeSinceLastCheck ?? 0}
|
||||
interval={monitor?.interval ?? 0}
|
||||
trigger={lastUpdateTrigger}
|
||||
/>
|
||||
|
||||
<MonitorTimeFrameHeader
|
||||
dateRange={dateRange}
|
||||
setDateRange={setDateRange}
|
||||
/>
|
||||
|
||||
<Stack
|
||||
direction="row"
|
||||
gap={theme.spacing(8)}
|
||||
|
||||
Reference in new issue
Block a user