aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui')
-rw-r--r--vnext/src/ui/Feeds.js8
-rw-r--r--vnext/src/ui/Post.js2
2 files changed, 5 insertions, 5 deletions
diff --git a/vnext/src/ui/Feeds.js b/vnext/src/ui/Feeds.js
index bd69155f..129be2de 100644
--- a/vnext/src/ui/Feeds.js
+++ b/vnext/src/ui/Feeds.js
@@ -45,7 +45,7 @@ function RequireAuth({ children }) {
*
*/
export function Discover() {
- const search = useSearchParams();
+ const [search] = useSearchParams();
const query = {
baseUrl: '/api/messages',
search: search,
@@ -84,7 +84,7 @@ export function Discussions() {
*/
export function Blog() {
const { user } = useParams();
- const params = useSearchParams();
+ const [params] = useSearchParams();
const search = {
...params,
uname: user
@@ -167,7 +167,7 @@ function Feed({ query }) {
tag: ''
});
const [loading, setLoading] = useState(true);
- const filter = useSearchParams();
+ const [filter] = useSearchParams();
useEffect(() => {
setLoading(true);
let getPageParam = (pageParam, lastMessage, /** @type { URLSearchParams } */ filterParams) => {
@@ -202,7 +202,7 @@ function Feed({ query }) {
};
});
});
- }, [location.search, query, filter]);
+ }, [query, filter]);
return (state.msgs.length > 0 ? (
<div className="msgs">
{
diff --git a/vnext/src/ui/Post.js b/vnext/src/ui/Post.js
index 74b74ffc..8fc753b4 100644
--- a/vnext/src/ui/Post.js
+++ b/vnext/src/ui/Post.js
@@ -17,7 +17,7 @@ export default function Post() {
const [visitor] = useVisitor();
let draftMessage = (location.state || {}).data || {};
let [draft, setDraft] = useState(draftMessage.body);
- let params = useSearchParams();
+ let [params] = useSearchParams();
let postMessage = (template) => {
const { attach, body } = template;
const postAction = draftMessage.mid ? update(draftMessage.mid, 0, body) : post(body, attach);