Update page title

This commit is contained in:
Paulo Gustavo Veiga 2022-05-29 20:41:32 -07:00
parent 7cb4a93387
commit ff639aab4f
6 changed files with 25 additions and 24 deletions

View File

@ -32,6 +32,7 @@ ReactGA.initialize([
} }
]); ]);
const queryClient = new QueryClient({ const queryClient = new QueryClient({
defaultOptions: { defaultOptions: {
queries: { queries: {

View File

@ -23,7 +23,7 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
const client: Client = useSelector(activeInstance); const client: Client = useSelector(activeInstance);
useEffect(() => { 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 => { const findEditorMode = (isTryMode: boolean, mapId: number): EditorRenderMode | null => {

View File

@ -80,8 +80,8 @@ const ForgotPasswordPage = (): React.ReactElement => {
const intl = useIntl(); const intl = useIntl();
useEffect(() => { useEffect(() => {
document.title = intl.formatMessage({ id: 'forgot.page-title', defaultMessage: 'Forgot Password | WiseMapping' }); 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 ( return (
<div> <div>

View File

@ -69,9 +69,9 @@ const LoginPage = (): React.ReactElement => {
const intl = useIntl(); const intl = useIntl();
useEffect(() => { useEffect(() => {
document.title = intl.formatMessage({id:'login.page-title',defaultMessage:'Login | WiseMapping'}); document.title = intl.formatMessage({ id: 'login.page-title', defaultMessage: 'Login | WiseMapping' });
ReactGA.send({ hitType: "pageview", page: window.location.pathname}); ReactGA.send({ hitType: 'pageview', page: window.location.pathname, title: 'Login' });
},[]); }, []);
return ( return (
<div> <div>
@ -90,7 +90,7 @@ const LoginPage = (): React.ReactElement => {
<FormControl> <FormControl>
<form action="/c/perform-login" method="POST"> <form action="/c/perform-login" method="POST">
<input type='hidden' value={getCsrfToken()} name={getCsrfTokenParameter()}/> <input type='hidden' value={getCsrfToken()} name={getCsrfTokenParameter()} />
<Input <Input
name="username" name="username"
type="email" type="email"

View File

@ -83,7 +83,7 @@ const MapsPage = (): ReactElement => {
id: 'maps.page-title', id: 'maps.page-title',
defaultMessage: 'My Maps | WiseMapping', 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), { const mutation = useMutation((id: number) => client.deleteLabel(id), {

View File

@ -165,8 +165,8 @@ const RegistationPage = (): React.ReactElement => {
id: 'registration.page-title', id: 'registration.page-title',
defaultMessage: 'Registration | WiseMapping', defaultMessage: 'Registration | WiseMapping',
}); });
ReactGA.send({ hitType: "pageview", page: window.location.pathname}); ReactGA.send({ hitType: 'pageview', page: window.location.pathname, title: 'Register' });
},[]); }, []);
return ( return (
<div> <div>