All files / react-app/src/hooks useHideBanner.ts

100% Statements 4/4
100% Branches 0/0
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      72x 89x   89x       89x    
import { useLDClient } from "launchdarkly-react-client-sdk";
import { featureFlags } from "shared-utils";
 
export const useHideBanner = (): boolean => {
  const ldClient = useLDClient();
  const isBannerHidden: boolean =
    ldClient?.variation(
      featureFlags.UAT_HIDE_MMDL_BANNER.flag,
      featureFlags.UAT_HIDE_MMDL_BANNER.defaultValue,
    ) === "on";
  return isBannerHidden;
};