Remove unused listeners

This commit is contained in:
Fabio Berger
2018-10-19 17:09:13 +01:00
parent 16ba01cd2e
commit 90ba8e0e8d
2 changed files with 0 additions and 18 deletions

View File

@@ -49,9 +49,6 @@ export class Wiki extends React.Component<WikiProps, WikiState> {
isHoveringSidebar: false,
};
}
public componentDidMount(): void {
window.addEventListener('hashchange', this._onHashChanged.bind(this), false);
}
public componentWillMount(): void {
// tslint:disable-next-line:no-floating-promises
this._fetchArticlesBySectionAsync();
@@ -59,7 +56,6 @@ export class Wiki extends React.Component<WikiProps, WikiState> {
public componentWillUnmount(): void {
this._isUnmounted = true;
clearTimeout(this._wikiBackoffTimeoutId);
window.removeEventListener('hashchange', this._onHashChanged.bind(this), false);
}
public render(): React.ReactNode {
const sectionNameToLinks = _.isUndefined(this.state.articlesBySection)
@@ -198,8 +194,4 @@ export class Wiki extends React.Component<WikiProps, WikiState> {
}
return sectionNameToLinks;
}
private _onHashChanged(_event: any): void {
const hash = window.location.hash.slice(1);
sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
}
}