All files / src/sections/VerifyAccountHolder_v2/components NonPahDisclaimer.tsx

57.14% Statements 4/7
33.33% Branches 2/6
100% Functions 1/1
60% Lines 3/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              3x 52x   52x                                                        
import React from "react";
import { Text } from "@common/Text";
import { palette } from "@palette";
import WarningIcon from "@assets/icons/RebrandedIcons/WarningIcon";
import useCheckPAH from "@hooks/common/useCheckPAH";
import { Stack } from "@mui/material";
 
export const NonPahDisclaimer = ({ step }: { step: string }) => {
  const { isLoggedInPAH } = useCheckPAH();
 
  Eif (isLoggedInPAH || step === "selfie") return null;
  if (step === "selfie") return null;
 
  return (
    <Stack
      bgcolor={palette.tag.warning.bg}
      borderRadius="12px"
      padding="12px 16px"
      spacing={1}
      mt={3}
    >
      <Stack direction="row" spacing={1}>
        <WarningIcon />
        <Text
          color={palette.filled.orange}
          fontSize="18px"
          fontWeight="regular"
        >
          Attention
        </Text>
      </Stack>
      <Text color={palette.warning.text} fontSize="14px" fontWeight="book">
        These details can only be filled and edited by the primary account
        holder.
      </Text>
    </Stack>
  );
};