Skip to content

Commit

Permalink
Merge pull request vercel#57 from eliamartani/fix/layout
Browse files Browse the repository at this point in the history
Update core/Layout function call
  • Loading branch information
okbel authored Nov 2, 2020
2 parents 1962163 + 5c4c0ce commit e37ceee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/core/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ const Layout: FC<Props> = ({ children, pageProps }) => {
debounce(() => {
const offset = 0
const { scrollTop } = document.documentElement
if (scrollTop > offset) setHasScrolled(true)
else setHasScrolled(false)
const scrolled = scrollTop > offset

setHasScrolled(scrolled)
}, 1)
}, [])

Expand Down

0 comments on commit e37ceee

Please sign in to comment.