#124: Frontend changes for latest issues with notifications

This commit is contained in:
frikky
2021-10-05 22:01:54 +02:00
parent 2842b04a69
commit 030adab327
9 changed files with 165 additions and 183 deletions
+2 -9
View File
@@ -1,8 +1,7 @@
import { useEffect } from 'react';
import { withRouter } from 'react-router-dom';
import ReactGA from 'react-ga';
function ScrollToTop({setCurpath, history }) {
function ScrollToTop({getUserNotifications, setCurpath, history }) {
useEffect(() => {
const unlisten = history.listen(() => {
window.scroll({
@@ -11,14 +10,8 @@ function ScrollToTop({setCurpath, history }) {
behavior: "smooth",
});
//ReactGA.event({
// category: "referral",
// action: "new_user_referral",
// label: "",
//})
ReactGA.pageview(window.location.pathname)
setCurpath(window.location.pathname)
getUserNotifications()
});
return () => {
unlisten();