diff --git a/src/screens/UserLoginScreen.tsx b/src/screens/UserLoginScreen.tsx index 88e5c75..0a9ae8c 100644 --- a/src/screens/UserLoginScreen.tsx +++ b/src/screens/UserLoginScreen.tsx @@ -22,7 +22,7 @@ const log = LOG.extend("UserLoginScreen"); const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ navigation }) => { log.debug("UserLoginScreen"); const insets = useSafeAreaInsets(); - const { setAuthenticationData } = useUserAuthenticationContext(); + const { setAuthenticationData, setUserInformations } = useUserAuthenticationContext(); const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); @@ -56,8 +56,9 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav const userInformationsMutation = useMutation({ mutationFn: (userAccessToken: string) => getUserInformations(userAccessToken), - onSuccess: (_data) => { + onSuccess: (userInformations) => { log.info("getUserInformations request was a success, navigating to homepage"); + setUserInformations(userInformations); navigation.navigate("appBottomTabsNavigator"); }, onError: (error) => {