Flow for all the files
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import { observer } from 'mobx-react';
|
||||
import _ from 'lodash';
|
||||
import { Flex } from 'reflexbox';
|
||||
@ -11,13 +12,16 @@ import Layout, { Title } from 'components/Layout';
|
||||
import CenteredContent from 'components/CenteredContent';
|
||||
import DocumentPreview from 'components/DocumentPreview';
|
||||
|
||||
@observer class Search extends React.Component {
|
||||
static propTypes = {
|
||||
route: PropTypes.object.isRequired,
|
||||
routeParams: PropTypes.object.isRequired,
|
||||
};
|
||||
type Props = {
|
||||
route: Object,
|
||||
routeParams: Object,
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
@observer class Search extends React.Component {
|
||||
props: Props;
|
||||
store: SearchStore;
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
this.store = new SearchStore();
|
||||
}
|
||||
@ -31,7 +35,7 @@ import DocumentPreview from 'components/DocumentPreview';
|
||||
}
|
||||
};
|
||||
|
||||
get viewNotFound() {
|
||||
get viewNotFound(): boolean {
|
||||
const { sceneType } = this.props.route;
|
||||
return sceneType === 'notFound';
|
||||
}
|
||||
@ -40,11 +44,7 @@ import DocumentPreview from 'components/DocumentPreview';
|
||||
const search = _.debounce(searchTerm => {
|
||||
this.store.search(searchTerm);
|
||||
}, 250);
|
||||
const title = (
|
||||
<Title>
|
||||
Search
|
||||
</Title>
|
||||
);
|
||||
const title = <Title content="Search" />;
|
||||
|
||||
return (
|
||||
<Layout
|
||||
|
Reference in New Issue
Block a user