interface icon indicating copy to clipboard operation
interface copied to clipboard

fix: fix gap above navbar on scroll with uk banner

Open ChefBingbong opened this issue 11 months ago • 0 comments

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

ChefBingbong avatar Mar 13 '24 00:03 ChefBingbong