aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-shared/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/react-shared/src')
-rw-r--r--packages/react-shared/src/components/anchor_title.tsx2
-rw-r--r--packages/react-shared/src/components/link.tsx2
-rw-r--r--packages/react-shared/src/components/nested_sidebar_menu.tsx14
-rw-r--r--packages/react-shared/src/utils/constants.ts3
4 files changed, 5 insertions, 16 deletions
diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx
index 8f7e4af27..a83881b67 100644
--- a/packages/react-shared/src/components/anchor_title.tsx
+++ b/packages/react-shared/src/components/anchor_title.tsx
@@ -71,7 +71,7 @@ export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleSt
hashSpy={true}
offset={headerSizeToScrollOffset[this.props.headerSize]}
duration={constants.DOCS_SCROLL_DURATION_MS}
- containerId={constants.DOCS_CONTAINER_ID}
+ containerId={constants.SCROLL_CONTAINER_ID}
>
<i
className="zmdi zmdi-link"
diff --git a/packages/react-shared/src/components/link.tsx b/packages/react-shared/src/components/link.tsx
index e8a13d506..51ffa1e1d 100644
--- a/packages/react-shared/src/components/link.tsx
+++ b/packages/react-shared/src/components/link.tsx
@@ -93,7 +93,7 @@ export class Link extends React.Component<LinkProps, LinkState> {
offset={0}
hashSpy={true}
duration={constants.DOCS_SCROLL_DURATION_MS}
- containerId={constants.DOCS_CONTAINER_ID}
+ containerId={constants.SCROLL_CONTAINER_ID}
className={this.props.className}
style={styleWithDefault}
>
diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx
index 709d0ace9..0bc516223 100644
--- a/packages/react-shared/src/components/nested_sidebar_menu.tsx
+++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx
@@ -94,12 +94,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N
: link.title;
return (
<div key={`menuItem-${finalMenuItemName}`}>
- <Link
- to={link.to}
- type={link.type}
- shouldOpenInNewTab={link.shouldOpenInNewTab}
- containerId={constants.DOCS_CONTAINER_ID}
- >
+ <Link to={link.to} type={link.type} shouldOpenInNewTab={link.shouldOpenInNewTab}>
<MenuItem
style={menuItemStyles}
innerDivStyle={menuItemInnerDivStyles}
@@ -136,12 +131,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N
const name = `${menuItemName}-${link.title}`;
return (
<li key={`menuSubsectionItem-${name}`}>
- <Link
- to={link.to}
- type={link.type}
- shouldOpenInNewTab={link.shouldOpenInNewTab}
- containerId={constants.DOCS_CONTAINER_ID}
- >
+ <Link to={link.to} type={link.type} shouldOpenInNewTab={link.shouldOpenInNewTab}>
<MenuItem
style={{ minHeight: 35 }}
innerDivStyle={{
diff --git a/packages/react-shared/src/utils/constants.ts b/packages/react-shared/src/utils/constants.ts
index 562ab776b..2dca1a078 100644
--- a/packages/react-shared/src/utils/constants.ts
+++ b/packages/react-shared/src/utils/constants.ts
@@ -2,8 +2,7 @@ import { Networks } from '../types';
export const constants = {
DOCS_SCROLL_DURATION_MS: 0,
- DOCS_CONTAINER_ID: 'documentation',
- SCROLL_CONTAINER_ID: 'documentation',
+ SCROLL_CONTAINER_ID: 'scroll_container',
SCROLL_TOP_ID: 'pageScrollTop',
NETWORK_NAME_BY_ID: {
1: Networks.Mainnet,