aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vnext/src/App.js25
-rw-r--r--vnext/src/ui/Feeds.js1
2 files changed, 13 insertions, 13 deletions
diff --git a/vnext/src/App.js b/vnext/src/App.js
index bcd2b169..69ceb456 100644
--- a/vnext/src/App.js
+++ b/vnext/src/App.js
@@ -57,6 +57,18 @@ export default function App({ footer }) {
const [eventSource, setEventSource] = /** @param EventSource? */ useState({});
+ /**
+ * @param {import("./api").SecureUser} visitor
+ */
+ let auth = useCallback((visitor) => {
+ setVisitor(prevState => {
+ if (visitor.hash != prevState.hash) {
+ setHash(visitor.hash);
+ }
+ return visitor;
+ });
+ }, [setVisitor]);
+
useEffect(() => {
let es;
const anonymousUser = {
@@ -90,7 +102,7 @@ export default function App({ footer }) {
es.removeEventListener('msg', updateStatus);
}
});
- }, [hash, setVisitor, updateStatus]);
+ }, [auth, hash, setVisitor, updateStatus]);
useEffect(() => {
const getTrends = async () => {
@@ -99,17 +111,6 @@ export default function App({ footer }) {
getTrends().catch(console.error);
}, []);
- /**
- * @param {import("./api").SecureUser} visitor
- */
- let auth = useCallback((visitor) => {
- setVisitor(prevState => {
- if (visitor.hash != prevState.hash) {
- setHash(visitor.hash);
- }
- return visitor;
- });
- }, [setVisitor]);
return (
<>
<Header />
diff --git a/vnext/src/ui/Feeds.js b/vnext/src/ui/Feeds.js
index d4b9e8c9..48da52e3 100644
--- a/vnext/src/ui/Feeds.js
+++ b/vnext/src/ui/Feeds.js
@@ -183,7 +183,6 @@ function Feed({ query }) {
const { pageParam } = query;
const lastMessage = data.slice(-1)[0] || {};
const nextpage = getPageParam(pageParam, lastMessage, new URLSearchParams(params));
- console.log('nextpage', nextpage);
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
setState((prevState) => {