Flow for all the files

This commit is contained in:
Jori Lallo
2017-05-11 17:23:56 -07:00
parent a98199599a
commit 0a76d6af9e
110 changed files with 512 additions and 269 deletions

View File

@ -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