aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-12-14 20:01:31 +0800
committerEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-12-14 20:01:31 +0800
commitf083cafcc73477d17abc33dc0636a2833f8d53f8 (patch)
treec5beb0184c261434159e3ce402c89fdbd95bbbad /packages/website
parentfab3a90d5add060f2bfeb1dc470373af03fd6d83 (diff)
downloaddexon-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.tsx5
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,