Browse Source

Do the yarn prettier

main
Lucas Lentz 8 years ago
parent
commit
238ffd9709
  1. 10
      src/components/DocSearch/DocSearch.js

10
src/components/DocSearch/DocSearch.js

@ -9,25 +9,25 @@ import {colors, media} from 'theme';
class DocSearch extends Component { class DocSearch extends Component {
state = { state = {
disabled: false disabled: false,
} };
componentDidMount() { componentDidMount() {
// Initialize Algolia search. // Initialize Algolia search.
// TODO Is this expensive? Should it be deferred until a user is about to search? // TODO Is this expensive? Should it be deferred until a user is about to search?
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
if(window.docsearch) { if (window.docsearch) {
docsearch({ docsearch({
apiKey: '36221914cce388c46d0420343e0bb32e', apiKey: '36221914cce388c46d0420343e0bb32e',
indexName: 'react', indexName: 'react',
inputSelector: '#algolia-doc-search', inputSelector: '#algolia-doc-search',
}); });
} else { } else {
this.setState({ disabled: true}) this.setState({disabled: true});
} }
} }
render() { render() {
const {disabled} = this.state const {disabled} = this.state;
return ( return (
<form <form

Loading…
Cancel
Save