jscottsmith / react-scroll-parallax

🔮 React hooks and components to create parallax scroll effects for banners, images or any other DOM elements.
https://react-scroll-parallax.damnthat.tv/
MIT License
2.86k stars 158 forks source link

fix ParallaxBanner in case some childs are null #173

Closed dohomi closed 1 year ago

dohomi commented 1 year ago

I bump into this issue while some of my children are of type null

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
react-scroll-parallax ✅ Ready (Inspect) Visit Preview Oct 30, 2022 at 7:49AM (UTC)
dohomi commented 1 year ago

@jscottsmith inside of the ParallaxBanner I run backend code in a loop and if some criteria does not match I return null as a component. It would be great if that wouldn't break the component.

codecov-commenter commented 1 year ago

Codecov Report

Base: 85.46% // Head: 85.46% // No change to project coverage :thumbsup:

Coverage data is based on head (938dc24) compared to base (dc31c03). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #173 +/- ## ======================================= Coverage 85.46% 85.46% ======================================= Files 19 19 Lines 227 227 Branches 41 41 ======================================= Hits 194 194 Misses 32 32 Partials 1 1 ``` | [Impacted Files](https://codecov.io/gh/jscottsmith/react-scroll-parallax/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=J+Scott+Smith) | Coverage Δ | | |---|---|---| | [src/components/ParallaxBanner/index.tsx](https://codecov.io/gh/jscottsmith/react-scroll-parallax/pull/173/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=J+Scott+Smith#diff-c3JjL2NvbXBvbmVudHMvUGFyYWxsYXhCYW5uZXIvaW5kZXgudHN4) | `93.10% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=J+Scott+Smith). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=J+Scott+Smith)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

jscottsmith commented 1 year ago

Makes sense, thanks for the PR! I'll get this out in a release soon.