diff --git a/packages/webapp/src/app.tsx b/packages/webapp/src/app.tsx
index 882e8dff..d1b1f9ce 100644
--- a/packages/webapp/src/app.tsx
+++ b/packages/webapp/src/app.tsx
@@ -71,7 +71,7 @@ const App = (): 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);