Ah, cool this is my function to run on initial app...
# general
s
Ah, cool this is my function to run on initial app load (removed /check)
Copy code
JavaScript
  const initialCheck = async () => {
    const val = await st.doesSessionExist();
    const id = await getUserId();
    if (val && id) {
      setAuthFlow({ loading: false, loggedIn: true, pop: true });
    } else {
      setAuthFlow({ loading: false, loggedIn: false, pop: true });
    }
  };