All files / src/features/Merchants/GiveCreateMerchantPanel/components LocalConfiguration.tsx

83.33% Statements 5/6
75% Branches 3/4
100% Functions 1/1
83.33% Lines 5/6

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        3x 70x 70x     70x 70x                      
import { Box } from "@mui/material";
import { useFormContext } from "react-hook-form";
import ProviderConfigurationSection from "features/Merchants/MerchantSidePanel/components/ProviderConfigurationSection";
 
const LocalConfiguration = () => {
  const { watch } = useFormContext();
  const values = watch();
 
  // Only render if we have permissions
  Eif (!values.permissions || Object.keys(values.permissions).length === 0) {
    return null;
  }
 
  return (
    <Box data-testid="local-configuration-container" mx="20px">
      <ProviderConfigurationSection />
    </Box>
  );
};
 
export default LocalConfiguration;