Skip to content

Commit

Permalink
Update Overlay.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
gilluminate committed Dec 3, 2024
1 parent b077d02 commit 463fed0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clients/fides-js/src/components/Overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ const Overlay: FunctionComponent<Props> = ({
const delayBannerMilliseconds = 100;
const delayModalLinkMilliseconds = 200;
const hasMounted = useHasMounted();
const isKnownPreference =
const isAutomatedConsent =
options.fidesConsentOverride === ConsentMethod.ACCEPT ||
options.fidesConsentOverride === ConsentMethod.REJECT;

const showBanner = useMemo(
() =>
!isKnownPreference &&
!isAutomatedConsent &&
!options.fidesDisableBanner &&
experience.experience_config?.component !== ComponentType.MODAL &&
shouldResurfaceConsent(experience, cookie, savedConsent),
[cookie, savedConsent, experience, options, isKnownPreference],
[cookie, savedConsent, experience, options, isAutomatedConsent],
);

const [bannerIsOpen, setBannerIsOpen] = useState(
Expand Down

0 comments on commit 463fed0

Please sign in to comment.