Merge pull request #2218 from bluewave-labs/fe/modify-pagespeed-warning

Modify PageSpeed warning box
This commit is contained in:
Alexander Holliday authored and GitHub committed 2025-05-08 11:52:21 -07:00
commit 6ff287d3d7
3 files changed
+8 -7

No files matched your search

+3 -3
View File
@@ -1,6 +1,7 @@
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { Box, Button, Stack, Typography, Link } from "@mui/material"; import { Box, Button, Stack, Typography, Link } from "@mui/material";
import { Link as RouterLink } from "react-router-dom";
import Skeleton from "../../assets/Images/create-placeholder.svg?react"; import Skeleton from "../../assets/Images/create-placeholder.svg?react";
import SkeletonDark from "../../assets/Images/create-placeholder-dark.svg?react"; import SkeletonDark from "../../assets/Images/create-placeholder-dark.svg?react";
import Background from "../../assets/Images/background-grid.svg?react"; import Background from "../../assets/Images/background-grid.svg?react";
@@ -35,9 +36,8 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false, show
<> <>
{t("pageSpeedWarning")} {" "} {t("pageSpeedWarning")} {" "}
<Link <Link
href="https://docs.checkmate.so/users-guide/quickstart#env-vars-server" component={RouterLink}
target="_blank" to="/settings"
rel="noopener noreferrer"
sx={{ sx={{
textDecoration: "underline", textDecoration: "underline",
color: "inherit", color: "inherit",
@@ -21,6 +21,7 @@ const PageSpeed = () => {
const { t } = useTranslation(); const { t } = useTranslation();
const isAdmin = useIsAdmin(); const isAdmin = useIsAdmin();
const { user } = useSelector((state) => state.auth); const { user } = useSelector((state) => state.auth);
const { pagespeedApiKey } = useSelector((state) => state.settings);
const { isLoading, monitors, summary, networkError } = useMonitorsFetch({ const { isLoading, monitors, summary, networkError } = useMonitorsFetch({
teamId: user.teamId, teamId: user.teamId,
@@ -52,7 +53,7 @@ const PageSpeed = () => {
]} ]}
link="/pagespeed/create" link="/pagespeed/create"
isAdmin={isAdmin} isAdmin={isAdmin}
showPageSpeedWarning={true} showPageSpeedWarning={isAdmin && !pagespeedApiKey}
/> />
); );
} }
+3 -3
View File
@@ -393,9 +393,9 @@
"errorInvalidTypeId": "Invalid notification type provided", "errorInvalidTypeId": "Invalid notification type provided",
"errorInvalidFieldId": "Invalid field ID provided", "errorInvalidFieldId": "Invalid field ID provided",
"inviteNoTokenFound": "No invite token found", "inviteNoTokenFound": "No invite token found",
"pageSpeedWarning": "Warning: You haven't added a Google PageSpeed API key. Without it, the PageSpeed monitor won't function.", "pageSpeedWarning": "Warning: You haven't added a Google PageSpeed API key yet. Without it, the PageSpeed monitor won't function.",
"pageSpeedLearnMoreLink": "Click here to learn", "pageSpeedLearnMoreLink": "Click here",
"pageSpeedAddApiKey": "how to add your API key.", "pageSpeedAddApiKey": "to add your API key.",
"update": "Update", "update": "Update",
"invalidFileFormat": "Unsupported file format!", "invalidFileFormat": "Unsupported file format!",
"invalidFileSize": "File size is too large!", "invalidFileSize": "File size is too large!",