aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/shared
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/pages/shared')
-rw-r--r--packages/website/ts/pages/shared/nested_sidebar_menu.tsx8
-rw-r--r--packages/website/ts/pages/shared/version_drop_down.tsx5
2 files changed, 6 insertions, 7 deletions
diff --git a/packages/website/ts/pages/shared/nested_sidebar_menu.tsx b/packages/website/ts/pages/shared/nested_sidebar_menu.tsx
index 69e32aecb..cbb863f3e 100644
--- a/packages/website/ts/pages/shared/nested_sidebar_menu.tsx
+++ b/packages/website/ts/pages/shared/nested_sidebar_menu.tsx
@@ -4,7 +4,7 @@ import {colors} from 'material-ui/styles';
import * as React from 'react';
import {Link as ScrollLink} from 'react-scroll';
import {VersionDropDown} from 'ts/pages/shared/version_drop_down';
-import {Docs, MenuSubsectionsBySection, Styles, ZeroExJsDocSections} from 'ts/types';
+import {Docs, MenuSubsectionsBySection, Styles} from 'ts/types';
import {constants} from 'ts/utils/constants';
import {typeDocUtils} from 'ts/utils/typedoc_utils';
import {utils} from 'ts/utils/utils';
@@ -16,7 +16,7 @@ interface NestedSidebarMenuProps {
onMenuItemClick?: () => void;
selectedVersion?: string;
versions?: string[];
- doc?: Docs;
+ docPath?: string;
isSectionHeaderClickable?: boolean;
}
@@ -77,11 +77,11 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N
<div>
{!_.isUndefined(this.props.versions) &&
!_.isUndefined(this.props.selectedVersion) &&
- !_.isUndefined(this.props.doc) &&
+ !_.isUndefined(this.props.docPath) &&
<VersionDropDown
selectedVersion={this.props.selectedVersion}
versions={this.props.versions}
- doc={this.props.doc}
+ docPath={this.props.docPath}
/>
}
{navigation}
diff --git a/packages/website/ts/pages/shared/version_drop_down.tsx b/packages/website/ts/pages/shared/version_drop_down.tsx
index 8f4f1a35b..4af9a834f 100644
--- a/packages/website/ts/pages/shared/version_drop_down.tsx
+++ b/packages/website/ts/pages/shared/version_drop_down.tsx
@@ -8,7 +8,7 @@ import {constants} from 'ts/utils/constants';
interface VersionDropDownProps {
selectedVersion: string;
versions: string[];
- doc: Docs;
+ docPath: string;
}
interface VersionDropDownState {}
@@ -40,7 +40,6 @@ export class VersionDropDown extends React.Component<VersionDropDownProps, Versi
return items;
}
private updateSelectedVersion(e: any, index: number, value: string) {
- const docPath = constants.docToPath[this.props.doc];
- window.location.href = `${docPath}/${value}${window.location.hash}`;
+ window.location.href = `${this.props.docPath}/${value}${window.location.hash}`;
}
}