diff options
author | 2018-07-06 01:32:43 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:53 +0300 | |
commit | 7f25b0f261b5a5fc2696054004fb24673375b91b (patch) | |
tree | 38ee591e176b4799e39eff7a16f1950e017e7bb4 /vnext/src/components/Feeds.js | |
parent | 88732ba8c06c23a93f7248b6eabc182f38be3d33 (diff) |
Proptypes & eslint
Diffstat (limited to 'vnext/src/components/Feeds.js')
-rw-r--r-- | vnext/src/components/Feeds.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/vnext/src/components/Feeds.js b/vnext/src/components/Feeds.js index 821a93f7..7b6713f6 100644 --- a/vnext/src/components/Feeds.js +++ b/vnext/src/components/Feeds.js @@ -1,5 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; +import ReactRouterPropTypes from 'react-router-prop-types'; import { Link } from 'react-router-dom'; import * as qs from 'query-string'; import moment from 'moment'; @@ -11,7 +12,7 @@ import { getMessages } from '../api'; export function Discover(props) { const query = { - baseUrl: "/messages", + baseUrl: '/messages', pageParam: 'before_mid' }; return (<Feed query={query} {...props} />) @@ -19,7 +20,7 @@ export function Discover(props) { export function Discussions(props) { const query = { - baseUrl: "/messages/discussions", + baseUrl: '/messages/discussions', pageParam: 'to' }; return (<Feed authRequired="true" query={query} {...props} />) @@ -28,7 +29,7 @@ export function Discussions(props) { export function Blog(props) { const { user } = props.match.params; const query = { - baseUrl: `/messages`, + baseUrl: '/messages', search: { uname: user }, @@ -134,6 +135,14 @@ class Feed extends React.Component { } } +Blog.propTypes = { + match: ReactRouterPropTypes.match.isRequired +}; + +Tag.propTypes = { + match: ReactRouterPropTypes.match.isRequired +}; + Feed.propTypes = { msgs: PropTypes.array, query: PropTypes.shape({ |