mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2025-01-03 16:53:50 +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="/c/login" element={<LoginPage />} />
|
||||
<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/forgot-password" element={<ForgotPasswordPage />} />
|
||||
<Route
|
||||
|
@ -10,7 +10,7 @@ import ReactGA from 'react-ga4';
|
||||
import Client from '../../classes/client';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { activeInstance } from '../../redux/clientSlice';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { css } from '@emotion/react';
|
||||
import { CircularProgress } from '@mui/material';
|
||||
|
||||
@ -21,7 +21,7 @@ const RegistrationCallbackPage = (): React.ReactElement => {
|
||||
const [email, setEmail] = useState(undefined);
|
||||
const [syncCode, setSyncCode] = useState(undefined);
|
||||
const [googleSync, setGoogleSync] = useState(undefined);
|
||||
const history = useHistory();
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
document.title = intl.formatMessage({
|
||||
@ -42,7 +42,7 @@ const RegistrationCallbackPage = (): React.ReactElement => {
|
||||
.then((result) => {
|
||||
if (result.googleSync) {
|
||||
// if service reports that user already has sync accounts, go to maps page
|
||||
history.push('/c/maps');
|
||||
navigate('/c/maps');
|
||||
}
|
||||
setEmail(result.email);
|
||||
setSyncCode(result.syncCode);
|
||||
@ -62,7 +62,7 @@ const RegistrationCallbackPage = (): React.ReactElement => {
|
||||
client
|
||||
.confirmAccountSync(email, syncCode)
|
||||
.then(() => {
|
||||
history.push('/c/maps');
|
||||
navigate('/c/maps');
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('ERROR', error);
|
||||
|
Loading…
Reference in New Issue
Block a user