All files / src/features/Merchants/MerchantsTable OnboardingScore.tsx

100% Statements 4/4
75% Branches 3/4
100% Functions 1/1
100% Lines 4/4

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          36x 36x 24x               12x    
import GiveProgressBar from "@shared/ProgressBar/GiveProgressBar";
import CircularScore from "@shared/UnderwritingScore/CircularScore";
import { useCustomThemeV2 } from "@theme/hooks/useCustomThemeV2";
 
export default function OnboardingScore({ score }: { score: number }) {
  const { isDesktopView } = useCustomThemeV2();
  if (isDesktopView)
    return (
      <GiveProgressBar
        value={score}
        variant={score === 100 ? "completed" : "incomplete"}
        type="onboarding"
      />
    );
 
  return <CircularScore defaultThreshold={100} score={score} simple />;
}