mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-05-17 20:08:07 +08:00
Refactored types for better readability
This commit is contained in:
parent
ce2bffe1cb
commit
497e50f2a4
9 changed files with 157 additions and 117 deletions
|
@ -1,7 +1,7 @@
|
|||
import * as React from "react";
|
||||
import styles from "../../styles";
|
||||
import { View, Text, ActivityIndicator } from "react-native";
|
||||
import { TokenRefresh, UserInfo } from "../../components/Api/Api";
|
||||
import { TokenRefresh, GetUserInfo } from "../../components/Api/Api";
|
||||
import { useDispatch } from "react-redux";
|
||||
import { colors } from "../../styles";
|
||||
import { useEffect, useState } from "react";
|
||||
|
@ -25,7 +25,7 @@ export default function Revalidation() {
|
|||
useEffect(() => {
|
||||
setState("Previous session found");
|
||||
TokenRefresh().then(async (response) => {
|
||||
let user_info = await UserInfo();
|
||||
let user_info = await GetUserInfo();
|
||||
if (response && user_info[0]) {
|
||||
dispatch(login());
|
||||
dispatch(setUser(user_info[1]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue