All files / src/pages/Login DifferentAccount.tsx

57.14% Statements 4/7
100% Branches 0/0
0% Functions 0/3
80% Lines 4/5

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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71                1x                                                                 1x                     1x               1x                    
import React from "react";
import { Box, Stack, styled } from "@mui/material";
import { Text } from "@common/Text";
import { MainLogo } from "@hooks/common/useEnterpriseLogo";
import Logo from "@assets/icons/RebrandedIcons/LogoBlueAccent";
import InfoFillIcon from "@assets/icons/InfoFillIcon";
import { Button } from "@components/common/Button";
 
const DifferentAccount = ({
  onSwitchAccount,
  onContinueAnyway,
}: {
  onSwitchAccount(): void;
  onContinueAnyway(): void;
}) => {
  return (
    <StyledRoot>
      <MainLogo position="center" defaultLogo={<Logo />} />
      <Content>
        <Info>
          <InfoFillIcon />
          <Text fontSize={16} color="#575353">
            The transactions you’re looking for are not available on this
            account.
          </Text>
        </Info>
        <Stack width="180px" gap={2}>
          <Button
            onClick={onContinueAnyway}
            size="medium"
            background="tertiary"
          >
            Continue anyway
          </Button>
          <Button onClick={onSwitchAccount}>Switch account</Button>
        </Stack>
      </Content>
    </StyledRoot>
  );
};
 
const StyledRoot = styled(Box)(({ theme }) => ({
  minHeight: "100vh",
  display: "flex",
  flexDirection: "column",
  alignItems: "center",
  padding: "41px 32px 24px 32px",
  [theme.breakpoints.down("sm")]: {
    padding: "24px 16px",
  },
}));
 
const Info = styled(Box)(() => ({
  gap: 16,
  display: "flex",
  alignItems: "center",
  flexDirection: "column",
  textAlign: "center",
}));
 
const Content = styled(Box)({
  height: "80vh",
  display: "flex",
  flexDirection: "column",
  justifyContent: "flex-end",
  alignItems: "center",
  gap: 180,
});
 
export default DifferentAccount;