All files / app/features/profile/view/leaveReference/formSteps/submit ThankYouReference.tsx

71.42% Statements 10/14
100% Branches 0/0
0% Functions 0/2
76.92% Lines 10/13

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 461x 1x 1x 1x 1x 1x 1x 1x   1x                                                                     1x  
import { Typography } from "@mui/material";
import Button from "components/Button";
import StyledLink from "components/StyledLink";
import { Trans, useTranslation } from "i18n";
import { PROFILE } from "i18n/namespaces";
import { useRouter } from "next/router";
import { dashboardRoute, donationsRoute } from "routes";
import { theme } from "theme";
 
const ThankYouReference = () => {
  const { t } = useTranslation([PROFILE]);
  const router = useRouter();
 
  return (
    <>
      <Typography variant="h2">
        {t("profile:leave_reference.thank_you_header")}
      </Typography>
      <Typography sx={{ marginTop: theme.spacing(3) }}>
        {t("profile:leave_reference.thank_you_references_available")}
      </Typography>
      <Typography sx={{ marginTop: theme.spacing(3) }}>
        <Trans i18nKey="profile:leave_reference.thank_you_donation_prompt">
          Consider{" "}
          <StyledLink href={donationsRoute} sx={{ fontWeight: 600 }}>
            making a donation
          </StyledLink>
          ! Couchers.org is a 501(c)(3) non-profit organization and we need
          donations to keep our servers running
        </Trans>
      </Typography>
      <Typography sx={{ marginTop: theme.spacing(3) }}>
        {t("profile:leave_reference.thank_you_support")}
      </Typography>
      <Button
        sx={{ marginTop: theme.spacing(3) }}
        onClick={() => router.push(dashboardRoute)}
      >
        {t("profile:actions.back_to_dashboard")}
      </Button>
    </>
  );
};
 
export default ThankYouReference;