diff --git a/src/components/AnalyticsConsent/index.tsx b/src/components/AnalyticsConsent/index.tsx index 6888243d8c..5e9afbecec 100644 --- a/src/components/AnalyticsConsent/index.tsx +++ b/src/components/AnalyticsConsent/index.tsx @@ -1,10 +1,8 @@ -import { Button, Grid, Theme, Typography, useMediaQuery } from "@mui/material"; +import { Button, Grid2, Stack, Typography } from "@mui/material"; import Drawer from "@mui/material/Drawer"; import { ReactElement } from "react"; import { useTranslation } from "react-i18next"; -import { themeColors } from "types/theme"; - interface ConsentProps { onChangeConsent: (consentVal?: boolean) => void; required: boolean; @@ -17,8 +15,6 @@ export default function AnalyticsConsent(props: ConsentProps): ReactElement { const rejectAnalytics = (): void => props.onChangeConsent(false); const clickedAway = (): void => props.onChangeConsent(undefined); - const isXs = useMediaQuery((th) => th.breakpoints.only("xs")); - function ConsentButton(props: { onClick: () => void; text: string; @@ -26,7 +22,7 @@ export default function AnalyticsConsent(props: ConsentProps): ReactElement { return ( - + + + {t("userSettings.analyticsConsent.title")} + + + + {t( + analyticsOn + ? "userSettings.analyticsConsent.consentYes" + : "userSettings.analyticsConsent.consentNo" + )} + + + + {displayConsent && ( )} - + )} - + {/* Save button */} + - - - - + + + + - + ); }