Skip to content

Commit

Permalink
fix(docs): remove component page hash replacement (Semantic-Org#3528)
Browse files Browse the repository at this point in the history
* fix(docs): Component page hash replacement.

* Update ComponentDoc.js

* Update ComponentDoc.js

* Update ComponentDoc.js
  • Loading branch information
grumblerchester authored and mbakiev committed Jun 17, 2019
1 parent 3dde6fe commit 7defef1
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions docs/src/components/ComponentDoc/ComponentDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { withRouteData } from 'react-static'
import { Grid, Header, Icon } from 'semantic-ui-react'

import DocsLayout from 'docs/src/components/DocsLayout'
import { docTypes, examplePathToHash, getFormattedHash, scrollToAnchor } from 'docs/src/utils'
import { isBrowser } from 'src/lib'
import { docTypes, examplePathToHash, scrollToAnchor } from 'docs/src/utils'
import ComponentDocLinks from './ComponentDocLinks'
import ComponentDocSee from './ComponentDocSee'
import ComponentExamples from './ComponentExamples'
Expand Down Expand Up @@ -36,16 +35,6 @@ class ComponentDoc extends Component {
state = {}
examplesRef = createRef()

componentWillMount() {
const { exampleKeys, history } = this.props

if (isBrowser() && window.location.hash) {
const activePath = getFormattedHash(exampleKeys, window.location.hash)
history.replace(`${window.location.pathname}#${activePath}`)
this.setState({ activePath })
}
}

getChildContext() {
return {
onPassed: this.handleExamplePassed,
Expand Down

0 comments on commit 7defef1

Please sign in to comment.