From 7f25b0f261b5a5fc2696054004fb24673375b91b Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Fri, 6 Jul 2018 01:32:43 +0300
Subject: Proptypes & eslint
---
vnext/src/components/Feeds.js | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
(limited to 'vnext/src/components/Feeds.js')
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 ()
@@ -19,7 +20,7 @@ export function Discover(props) {
export function Discussions(props) {
const query = {
- baseUrl: "/messages/discussions",
+ baseUrl: '/messages/discussions',
pageParam: 'to'
};
return ()
@@ -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({
--
cgit v1.2.3