Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(ComponentSidebar): remove empty item in docs sidebar #728

Merged
merged 2 commits into from
Jan 17, 2019

Conversation

layershifter
Copy link
Member

Fixes #616.

}

componentWillReceiveProps(nextProps) {
this.fetchSections(nextProps)
componentDidUpdate(prevProps: ComponentSidebarProps) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched from deprecated componentWillReceiveProps

import(`docs/src/exampleMenus/${displayName}.examples.json`).then(sections => {
this.setState({ sections })
this.setState({ sections: sections.default })
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import() returned all exported keys, but also returned default

{
  section1: '',
  section2: '',
  default: {
    section1: '',
    section2: '',
  }
}

@layershifter layershifter added 🚀 ready for review 🧰 fix Introduces fix for broken behavior. labels Jan 15, 2019
@layershifter layershifter merged commit fe645d6 into master Jan 17, 2019
@layershifter layershifter deleted the docs/useless-item branch January 17, 2019 09:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧰 fix Introduces fix for broken behavior. 🚀 ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants