mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2025-01-05 09:43:48 +01:00
fixes tests
This commit is contained in:
parent
31411997bc
commit
8320a95e16
@ -71,7 +71,7 @@ const App = (): ReactElement => {
|
|||||||
<Route path="/" element={<Redirect to="/c/login" />} />
|
<Route path="/" element={<Redirect to="/c/login" />} />
|
||||||
<Route path="/c/login" element={<LoginPage />} />
|
<Route path="/c/login" element={<LoginPage />} />
|
||||||
<Route path="/c/registration" element={<RegistationPage />} />
|
<Route path="/c/registration" element={<RegistationPage />} />
|
||||||
<Route path="/c/registration-google" component={RegistrationCallbackPage} />
|
<Route path="/c/registration-google" element={<RegistrationCallbackPage />} />
|
||||||
<Route path="/c/registration-success" element={<RegistrationSuccessPage />} />
|
<Route path="/c/registration-success" element={<RegistrationSuccessPage />} />
|
||||||
<Route path="/c/forgot-password" element={<ForgotPasswordPage />} />
|
<Route path="/c/forgot-password" element={<ForgotPasswordPage />} />
|
||||||
<Route
|
<Route
|
||||||
|
@ -10,7 +10,7 @@ import ReactGA from 'react-ga4';
|
|||||||
import Client from '../../classes/client';
|
import Client from '../../classes/client';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import { activeInstance } from '../../redux/clientSlice';
|
import { activeInstance } from '../../redux/clientSlice';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { css } from '@emotion/react';
|
import { css } from '@emotion/react';
|
||||||
import { CircularProgress } from '@mui/material';
|
import { CircularProgress } from '@mui/material';
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ const RegistrationCallbackPage = (): React.ReactElement => {
|
|||||||
const [email, setEmail] = useState(undefined);
|
const [email, setEmail] = useState(undefined);
|
||||||
const [syncCode, setSyncCode] = useState(undefined);
|
const [syncCode, setSyncCode] = useState(undefined);
|
||||||
const [googleSync, setGoogleSync] = useState(undefined);
|
const [googleSync, setGoogleSync] = useState(undefined);
|
||||||
const history = useHistory();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.title = intl.formatMessage({
|
document.title = intl.formatMessage({
|
||||||
@ -42,7 +42,7 @@ const RegistrationCallbackPage = (): React.ReactElement => {
|
|||||||
.then((result) => {
|
.then((result) => {
|
||||||
if (result.googleSync) {
|
if (result.googleSync) {
|
||||||
// if service reports that user already has sync accounts, go to maps page
|
// if service reports that user already has sync accounts, go to maps page
|
||||||
history.push('/c/maps');
|
navigate('/c/maps');
|
||||||
}
|
}
|
||||||
setEmail(result.email);
|
setEmail(result.email);
|
||||||
setSyncCode(result.syncCode);
|
setSyncCode(result.syncCode);
|
||||||
@ -62,7 +62,7 @@ const RegistrationCallbackPage = (): React.ReactElement => {
|
|||||||
client
|
client
|
||||||
.confirmAccountSync(email, syncCode)
|
.confirmAccountSync(email, syncCode)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
history.push('/c/maps');
|
navigate('/c/maps');
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log('ERROR', error);
|
console.log('ERROR', error);
|
||||||
|
Loading…
Reference in New Issue
Block a user