We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2430571 commit 182aaf1Copy full SHA for 182aaf1
src/shared/components/Header/index.jsx
@@ -54,23 +54,18 @@ const Header = ({
54
}, []);
55
56
/*
57
- * Reload notificaitons if token was changed
58
- * This prevent to use expired token in API call
59
- */
60
- if (auth) {
61
- useEffect(() => {
62
- loadNotifications(auth.tokenV3);
63
- }, [auth.tokenV3]);
64
- }
65
-
66
- /*
67
- * Init Google Analytics
+ * Load Notifications and Init Google Analytics
68
*/
69
- if (auth && auth.user) {
70
71
- tracking.init(auth.user.handle);
72
- }, [auth.user.handle]);
73
+ useEffect(() => {
+ if (auth) {
+ if (auth.tokenV3) {
+ loadNotifications(auth.tokenV3);
+ }
+ if (auth.user) {
+ tracking.init(auth.user.handle);
+ }, []);
74
75
if (TopNavRef) {
76
return (
0 commit comments