diff options
author | Ezekiel Aquino <ezekiel@bakkenbaeck.no> | 2018-12-14 20:01:31 +0800 |
---|---|---|
committer | Ezekiel Aquino <ezekiel@bakkenbaeck.no> | 2018-12-14 20:01:31 +0800 |
commit | f083cafcc73477d17abc33dc0636a2833f8d53f8 (patch) | |
tree | c5beb0184c261434159e3ce402c89fdbd95bbbad /packages/website | |
parent | fab3a90d5add060f2bfeb1dc470373af03fd6d83 (diff) | |
download | dexon-sol-tools-f083cafcc73477d17abc33dc0636a2833f8d53f8.tar dexon-sol-tools-f083cafcc73477d17abc33dc0636a2833f8d53f8.tar.gz dexon-sol-tools-f083cafcc73477d17abc33dc0636a2833f8d53f8.tar.bz2 dexon-sol-tools-f083cafcc73477d17abc33dc0636a2833f8d53f8.tar.lz dexon-sol-tools-f083cafcc73477d17abc33dc0636a2833f8d53f8.tar.xz dexon-sol-tools-f083cafcc73477d17abc33dc0636a2833f8d53f8.tar.zst dexon-sol-tools-f083cafcc73477d17abc33dc0636a2833f8d53f8.zip |
Scrolls doc to top/ensures overfow on document on route change
Diffstat (limited to 'packages/website')
-rw-r--r-- | packages/website/ts/@next/components/siteWrap.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/website/ts/@next/components/siteWrap.tsx b/packages/website/ts/@next/components/siteWrap.tsx index cc7e4a098..8588e4531 100644 --- a/packages/website/ts/@next/components/siteWrap.tsx +++ b/packages/website/ts/@next/components/siteWrap.tsx @@ -97,6 +97,11 @@ export class SiteWrap extends React.Component<Props, State> { isMobileNavOpen: false, }; + public componentDidMount(): void { + document.documentElement.style.overflowY = 'auto'; + window.scrollTo(0, 0); + } + public toggleMobileNav = () => { this.setState({ isMobileNavOpen: !this.state.isMobileNavOpen, |