Skip to content

Commit f5b6c31

Browse files
committed
additional comments to explain when the dispatch event fires
1 parent d5f67d2 commit f5b6c31

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

dotcom-rendering/src/components/StickyBottomBanner.importable.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,8 @@ export const StickyBottomBanner = ({
406406
isInAuxiaControlGroup,
407407
]);
408408

409+
//Dispatches 'banner:none' event after pickMessage completes with no banner selected.
410+
//hasPickMessageCompleted distinguishes between initial state (not picked yet) and final state (picked nothing).
409411
useEffect(() => {
410412
if (hasPickMessageCompleted && SelectedBanner == null) {
411413
document.dispatchEvent(

0 commit comments

Comments
 (0)