diff --git a/client/src/Components/Fallback/index.jsx b/client/src/Components/Fallback/index.jsx index 18fecd3dd..5b6da7062 100644 --- a/client/src/Components/Fallback/index.jsx +++ b/client/src/Components/Fallback/index.jsx @@ -1,6 +1,7 @@ import PropTypes from "prop-types"; import { useTheme } from "@emotion/react"; 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 SkeletonDark from "../../assets/Images/create-placeholder-dark.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")} {" "} { const { t } = useTranslation(); const isAdmin = useIsAdmin(); const { user } = useSelector((state) => state.auth); + const { pagespeedApiKey } = useSelector((state) => state.settings); const { isLoading, monitors, summary, networkError } = useMonitorsFetch({ teamId: user.teamId, @@ -52,7 +53,7 @@ const PageSpeed = () => { ]} link="/pagespeed/create" isAdmin={isAdmin} - showPageSpeedWarning={true} + showPageSpeedWarning={isAdmin && !pagespeedApiKey} /> ); } diff --git a/client/src/locales/gb.json b/client/src/locales/gb.json index 46174c62c..f527392bd 100644 --- a/client/src/locales/gb.json +++ b/client/src/locales/gb.json @@ -393,9 +393,9 @@ "errorInvalidTypeId": "Invalid notification type provided", "errorInvalidFieldId": "Invalid field ID provided", "inviteNoTokenFound": "No invite token found", - "pageSpeedWarning": "Warning: You haven't added a Google PageSpeed API key. Without it, the PageSpeed monitor won't function.", - "pageSpeedLearnMoreLink": "Click here to learn", - "pageSpeedAddApiKey": "how to add your API key.", + "pageSpeedWarning": "Warning: You haven't added a Google PageSpeed API key yet. Without it, the PageSpeed monitor won't function.", + "pageSpeedLearnMoreLink": "Click here", + "pageSpeedAddApiKey": "to add your API key.", "update": "Update", "invalidFileFormat": "Unsupported file format!", "invalidFileSize": "File size is too large!",