diff --git a/packages/webapp/src/app.tsx b/packages/webapp/src/app.tsx index 5902dce0..b1b905f9 100644 --- a/packages/webapp/src/app.tsx +++ b/packages/webapp/src/app.tsx @@ -32,6 +32,7 @@ ReactGA.initialize([ } ]); + const queryClient = new QueryClient({ defaultOptions: { queries: { diff --git a/packages/webapp/src/components/editor-page/index.tsx b/packages/webapp/src/components/editor-page/index.tsx index 40d0eb4a..7173e9cb 100644 --- a/packages/webapp/src/components/editor-page/index.tsx +++ b/packages/webapp/src/components/editor-page/index.tsx @@ -23,7 +23,7 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => { const client: Client = useSelector(activeInstance); useEffect(() => { - ReactGA.send({ hitType: "pageview", page: window.location.pathname}); + ReactGA.send({ hitType: 'pageview', page: window.location.pathname, title: `Editor - ${mapId}` }); }, []); const findEditorMode = (isTryMode: boolean, mapId: number): EditorRenderMode | null => { diff --git a/packages/webapp/src/components/forgot-password-page/index.tsx b/packages/webapp/src/components/forgot-password-page/index.tsx index fda9c4d3..6bbed323 100644 --- a/packages/webapp/src/components/forgot-password-page/index.tsx +++ b/packages/webapp/src/components/forgot-password-page/index.tsx @@ -80,8 +80,8 @@ const ForgotPasswordPage = (): React.ReactElement => { const intl = useIntl(); useEffect(() => { document.title = intl.formatMessage({ id: 'forgot.page-title', defaultMessage: 'Forgot Password | WiseMapping' }); - ReactGA.send({ hitType: "pageview", page: window.location.pathname}); - },[]); + ReactGA.send({ hitType: 'pageview', page: window.location.pathname, title: 'Forgot password' }); + }, []); return (
diff --git a/packages/webapp/src/components/login-page/index.tsx b/packages/webapp/src/components/login-page/index.tsx index f8d33b61..cc40924c 100644 --- a/packages/webapp/src/components/login-page/index.tsx +++ b/packages/webapp/src/components/login-page/index.tsx @@ -69,9 +69,9 @@ const LoginPage = (): React.ReactElement => { const intl = useIntl(); useEffect(() => { - document.title = intl.formatMessage({id:'login.page-title',defaultMessage:'Login | WiseMapping'}); - ReactGA.send({ hitType: "pageview", page: window.location.pathname}); - },[]); + document.title = intl.formatMessage({ id: 'login.page-title', defaultMessage: 'Login | WiseMapping' }); + ReactGA.send({ hitType: 'pageview', page: window.location.pathname, title: 'Login' }); + }, []); return (
@@ -90,7 +90,7 @@ const LoginPage = (): React.ReactElement => {
- + { id: 'maps.page-title', defaultMessage: 'My Maps | WiseMapping', }); - ReactGA.send({ hitType: "pageview", page: window.location.pathname}); + ReactGA.send({ hitType: 'pageview', page: window.location.pathname, title: 'Maps list' }); }, []); const mutation = useMutation((id: number) => client.deleteLabel(id), { @@ -287,20 +287,20 @@ interface ListItemProps { // https://stackoverflow.com/questions/61486061/how-to-set-selected-and-hover-color-of-listitem-in-mui const CustomListItem = withStyles({ root: { - "&$selected": { - backgroundColor: "rgb(210, 140, 5)", - color: "white", - "& .MuiListItemIcon-root": { - color: "white" - } - }, - "&$selected:hover": { - backgroundColor: "rgb(210, 140, 5)", - color: "white", - "& .MuiListItemIcon-root": { - color: "white" - } - }, + "&$selected": { + backgroundColor: "rgb(210, 140, 5)", + color: "white", + "& .MuiListItemIcon-root": { + color: "white" + } + }, + "&$selected:hover": { + backgroundColor: "rgb(210, 140, 5)", + color: "white", + "& .MuiListItemIcon-root": { + color: "white" + } + }, }, selected: {} })(ListItemButton); diff --git a/packages/webapp/src/components/registration-page/index.tsx b/packages/webapp/src/components/registration-page/index.tsx index 178ce109..3191cf25 100644 --- a/packages/webapp/src/components/registration-page/index.tsx +++ b/packages/webapp/src/components/registration-page/index.tsx @@ -165,8 +165,8 @@ const RegistationPage = (): React.ReactElement => { id: 'registration.page-title', defaultMessage: 'Registration | WiseMapping', }); - ReactGA.send({ hitType: "pageview", page: window.location.pathname}); - },[]); + ReactGA.send({ hitType: 'pageview', page: window.location.pathname, title: 'Register' }); + }, []); return (