|
@@ -118,12 +118,19 @@ export const AuthContextProvider: React.FC = ({children}) => {
|
|
|
authorized: false,
|
|
|
errorMessage: 'Failed to retrieve user data from server'})
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
if (response.status == 200) {
|
|
|
+=======
|
|
|
+ if (response.status === 200) {
|
|
|
+>>>>>>> a21b27df012bca6468d78c33a54c88ef7d8156c9
|
|
|
setAccessToken(accessTokenFromStorage)
|
|
|
setRefreshToken(await getItemAsync(SECURESTORE_REFRESHTOKEN))
|
|
|
setNotificationToken(await getItemAsync(SECURESTORE_NOTIFTOKEN))
|
|
|
setUserId(await getItemAsync(SECURESTORE_ID))
|
|
|
+<<<<<<< HEAD
|
|
|
setAnonUserId('')
|
|
|
+=======
|
|
|
+>>>>>>> a21b27df012bca6468d78c33a54c88ef7d8156c9
|
|
|
return
|
|
|
}
|
|
|
}
|
|
@@ -358,8 +365,6 @@ export const AuthContextProvider: React.FC = ({children}) => {
|
|
|
authorized: true,
|
|
|
errorMessage: 'Something went wrong when converting anonymous landmarks'
|
|
|
})
|
|
|
-
|
|
|
- setAnonUserId('')
|
|
|
|
|
|
setAlert({
|
|
|
title: 'Heads up',
|
|
@@ -368,6 +373,8 @@ export const AuthContextProvider: React.FC = ({children}) => {
|
|
|
type: 'warning'
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ setAnonUserId('')
|
|
|
} catch (error) {
|
|
|
reportAxiosError("[Authentication]: Error when checking for anonymous landmarks", error);
|
|
|
setAlert({
|