fix: fix gap above navbar on scroll with uk banner #7671
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
heyaa. i made this this pr to fix a small issue with the nav bar for us UK users. if in the UK, when navigating on the explore or NFT pages the navbar does not allign back to the top of the page when the uk banner dissapears as the user scrolls. so a larg gap of about 60-70px remains above the navbar as you scroll
the banner is also permentant on the swap page in the current state because swap page on default is within the viewport so you cannot scroll to trigger the hiding of the banner, leaving it permantly in view for UK users.
I made this pr because i cannot dismiss the banner on the swap page and thought it would be nice to have that option aswell as the fix for the gap issue by making sure the navbar snaps back to the top: 0 position when the banner is not visible, if the user scrolls back to the top the banner will transition back in. (i think this is what the original logic was intending)
the dismiss button isnt permenant,i implemented a atom state which will keep the banner dismissed for 5 days if the user choses to close it because i understand the disclaimer is important and it should remain to serve as disclaimer reminder.
vimeo screencast of the issue/fix
https://vimeo.com/manage/videos/922800160/df7c8e17d7?extension_recording=true