[FIX] Google Analytics error
When Home component used in Login component, logEvent not passed. Now Home component only logs events if logEvent is defined (i.e. it's not called from the Login component)
This commit is contained in:
1 parent
614c222bcc
commit
a472c49efb
1 file changed
+1
-1
+1
-1
@@ -19,7 +19,7 @@ export default function Home(props) {
|
|||||||
document.title = "Parandum";
|
document.title = "Parandum";
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
props.logEvent("page_view");
|
if (props.logEvent) props.logEvent("page_view");
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in new issue
Block a user