Skip to content

Commit 168a990

Browse files
authored
fix: Scrollytelling layout in Next instance (#1408)
**Related Ticket:** #1402 ### Description of Changes Provide a fallback value for top offset of ScrollyMapContainer: When `topOffset` is undefined it causes the css `top` property to be faulty, which makes the `position: sticky` not working. ### Notes & Questions About Changes Do we still need the whole `useSlidingStickyHeaderProps` logic with the USWDS header? ### Validation / Testing You will to validate in the next-veda instance, making sure the map stays sticky on the top when scrolling down. Related PR on next-veda-ui: NASA-IMPACT/next-veda-ui#41
2 parents 42dd24f + 0f16be3 commit 168a990

File tree

1 file changed

+1
-1
lines changed
  • app/scripts/components/common/blocks/scrollytelling

1 file changed

+1
-1
lines changed

app/scripts/components/common/blocks/scrollytelling/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ function Scrollytelling(props) {
359359

360360
return (
361361
<>
362-
<ScrollyMapContainer topOffset={topOffset}>
362+
<ScrollyMapContainer topOffset={topOffset || 0}>
363363
{areLayersLoading && <MapLoading />}
364364

365365
{/*

0 commit comments

Comments
 (0)