aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/shared/version_drop_down.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/pages/shared/version_drop_down.tsx')
-rw-r--r--packages/website/ts/pages/shared/version_drop_down.tsx20
1 files changed, 6 insertions, 14 deletions
diff --git a/packages/website/ts/pages/shared/version_drop_down.tsx b/packages/website/ts/pages/shared/version_drop_down.tsx
index 4af9a834f..b922e1048 100644
--- a/packages/website/ts/pages/shared/version_drop_down.tsx
+++ b/packages/website/ts/pages/shared/version_drop_down.tsx
@@ -2,8 +2,6 @@ import * as _ from 'lodash';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
import * as React from 'react';
-import {Docs} from 'ts/types';
-import {constants} from 'ts/utils/constants';
interface VersionDropDownProps {
selectedVersion: string;
@@ -16,30 +14,24 @@ interface VersionDropDownState {}
export class VersionDropDown extends React.Component<VersionDropDownProps, VersionDropDownState> {
public render() {
return (
- <div className="mx-auto" style={{width: 120}}>
+ <div className="mx-auto" style={{ width: 120 }}>
<DropDownMenu
maxHeight={300}
value={this.props.selectedVersion}
- onChange={this.updateSelectedVersion.bind(this)}
+ onChange={this._updateSelectedVersion.bind(this)}
>
- {this.renderDropDownItems()}
+ {this._renderDropDownItems()}
</DropDownMenu>
</div>
);
}
- private renderDropDownItems() {
+ private _renderDropDownItems() {
const items = _.map(this.props.versions, version => {
- return (
- <MenuItem
- key={version}
- value={version}
- primaryText={`v${version}`}
- />
- );
+ return <MenuItem key={version} value={version} primaryText={`v${version}`} />;
});
return items;
}
- private updateSelectedVersion(e: any, index: number, value: string) {
+ private _updateSelectedVersion(e: any, index: number, value: string) {
window.location.href = `${this.props.docPath}/${value}${window.location.hash}`;
}
}