aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Feeds.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-11-11 15:29:45 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:53 +0300
commit9f1dd954d7023c6a121659d1299fb83fc117a66d (patch)
tree997663acf0ce16715728371bdf7ec4a139fcc139 /vnext/src/components/Feeds.js
parent5f13cdc450dadd5708c8311880ebe9d451ae8989 (diff)
Fix qs.parse calls
Diffstat (limited to 'vnext/src/components/Feeds.js')
-rw-r--r--vnext/src/components/Feeds.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/vnext/src/components/Feeds.js b/vnext/src/components/Feeds.js
index 27d1c074..be9a1573 100644
--- a/vnext/src/components/Feeds.js
+++ b/vnext/src/components/Feeds.js
@@ -14,7 +14,7 @@ import { getMessages } from '../api';
import { UserType } from './Types';
export function Discover(props) {
- let search = qs.parse(props.location.search);
+ let search = qs.parse(props.location.search.substring(1));
const query = {
baseUrl: '/messages',
search: search,
@@ -33,7 +33,7 @@ export function Discussions(props) {
export function Blog(props) {
const { user } = props.match.params;
- let search = qs.parse(props.location.search);
+ let search = qs.parse(props.location.search.substring(1));
search.uname = user;
const query = {
baseUrl: '/messages',
@@ -77,7 +77,7 @@ class Feed extends React.Component {
};
}
componentDidMount() {
- this.loadMessages(this.props.visitor.hash, this.props.location.search);
+ this.loadMessages(this.props.visitor.hash, this.props.location.search.substring(1));
}
shouldComponentUpdate(nextProps, nextState) {
@@ -91,7 +91,7 @@ class Feed extends React.Component {
}
componentDidUpdate(prevProps, prevState, shouldReload) {
if (shouldReload) {
- this.loadMessages(this.props.visitor.hash, this.props.location.search);
+ this.loadMessages(this.props.visitor.hash, this.props.location.search.substring(1));
}
}
loadMessages = (hash = '', filter = '') => {
@@ -127,7 +127,7 @@ class Feed extends React.Component {
}
render() {
- const { tag } = qs.parse(this.props.location.search || {});
+ const { tag } = qs.parse(this.props.location.search.substring(1) || {});
const nodes = (
<>
{