aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Feeds.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-07-26 13:22:00 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:55 +0300
commitf707d3d524d8d16e2bb780764f029d85fc57ecc0 (patch)
tree1580074a665bd16c9744b5749c2a777700c5ae73 /vnext/src/ui/Feeds.js
parent6016b0888e77497e15384f1cd024eb42672129a4 (diff)
prop-types -> jsdoc
Diffstat (limited to 'vnext/src/ui/Feeds.js')
-rw-r--r--vnext/src/ui/Feeds.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/vnext/src/ui/Feeds.js b/vnext/src/ui/Feeds.js
index e44de1ec..39c1296b 100644
--- a/vnext/src/ui/Feeds.js
+++ b/vnext/src/ui/Feeds.js
@@ -1,6 +1,5 @@
import React, { useState, useEffect } from 'react';
-import PropTypes from 'prop-types';
-import ReactRouterPropTypes from 'react-router-prop-types';
+
import { Link } from 'react-router-dom';
import qs from 'qs';
import moment from 'moment';
@@ -11,7 +10,6 @@ import Spinner from './Spinner';
import UserInfo from './UserInfo';
import { getMessages } from '../api';
-import { UserType } from './Types';
export function Discover(props) {
let search = qs.parse(props.location.search.substring(1));
@@ -31,6 +29,10 @@ export function Discussions(props) {
return (<Feed authRequired={false} query={query} {...props} />);
}
+/**
+ * Blog page
+ * @param {{match: import('react-router').match, location: import('history').Location}} props
+ */
export function Blog(props) {
const { user } = props.match.params;
let search = qs.parse(props.location.search.substring(1));
@@ -113,7 +115,7 @@ function Feed(props) {
newFilter[pageParam] = pageValue;
return `?${qs.stringify(newFilter)}`;
};
- const { tag } = qs.parse(location.search.substring(1) || {});
+ const { tag } = qs.parse(location.search.substring(1)) || {};
const nodes = (
<>
{
@@ -142,7 +144,7 @@ function Feed(props) {
<div className="msgs">{nodes}</div>
) : error ? <div>error</div> : loading ? <div className="msgs"><Spinner /><Spinner /><Spinner /><Spinner /></div> : <div>No more messages</div>;
}
-
+/*
Discover.propTypes = {
location: ReactRouterPropTypes.location.isRequired,
search: PropTypes.string
@@ -170,3 +172,4 @@ Feed.propTypes = {
pageParam: PropTypes.string.isRequired
})
};
+*/ \ No newline at end of file