Remove location prop
This commit is contained in:
parent
0b1ba9f997
commit
c8ace2edc0
@ -47,7 +47,6 @@ const networkNameToColor: { [network: string]: string } = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export interface DocumentationProps {
|
export interface DocumentationProps {
|
||||||
location: Location;
|
|
||||||
docsVersion: string;
|
docsVersion: string;
|
||||||
availableDocVersions: string[];
|
availableDocVersions: string[];
|
||||||
docsInfo: DocsInfo;
|
docsInfo: DocsInfo;
|
||||||
@ -80,7 +79,7 @@ const styles: Styles = {
|
|||||||
export class Documentation extends React.Component<DocumentationProps, DocumentationState> {
|
export class Documentation extends React.Component<DocumentationProps, DocumentationState> {
|
||||||
public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState) {
|
public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState) {
|
||||||
if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) {
|
if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) {
|
||||||
const hash = this.props.location.hash.slice(1);
|
const hash = window.location.hash.slice(1);
|
||||||
sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
|
sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,6 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> {
|
|||||||
translate={this.props.translate}
|
translate={this.props.translate}
|
||||||
/>
|
/>
|
||||||
<Documentation
|
<Documentation
|
||||||
location={this.props.location}
|
|
||||||
docsVersion={this.props.docsVersion}
|
docsVersion={this.props.docsVersion}
|
||||||
availableDocVersions={this.props.availableDocVersions}
|
availableDocVersions={this.props.availableDocVersions}
|
||||||
docsInfo={this.props.docsInfo}
|
docsInfo={this.props.docsInfo}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user