-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue where ref to hidden product pillow would cause sticky heade…
…r to be visible (#4883) <!-- PR title: GRW-123 / Feature / Awesome new thing --> ## Describe your changes Since we hide the product pillow when `isCondensedProductHero` is true, the behaviour became inconsistent when using a ref to check if you had scrolled past the pillow since the height would be 0 of that empty div. We can rather simplify it by just checking scroll position in StickyHeader instead. ### Issue: StickyHeader is visible when user hasn't scrolled ![Screenshot_20241022-091927](https://github.com/user-attachments/assets/d122e0a0-78f9-46e4-8807-f8471da37ed0) <!-- What changes are made? If there are many changes, a list might be a good format. If it makes sense, add screenshots and/or screen recordings here. --> ## Justify why they are needed ## Checklist before requesting a review - [ ] I have performed a self-review of my code
- Loading branch information
Showing
2 changed files
with
16 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 13 additions & 7 deletions
20
...re/src/features/priceCalculator/ProductHeroV2/StickyProductHeader/StickyProductHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters