## <Atlas />

Constructor

#### # <Atlas />

Sub-root component of the app. Contains all global providers (NavigationContainer and SafeAreaProvider for React Navigation, QueryClientProvider for react-query) and is responsible for restricting unauthenticated users to the Intro screen by listening to AuthStore's accessToken value.

View Source src/components/Atlas.tsx, line 29

# Members

#### # inner constant appState

Ref that keeps track of the app's state (opened or closed)

View Source src/components/Atlas.tsx, line 33

# Methods

#### # static checkTokenOnAccessTokenChange()

Calls `checkToken` when a change to the access token stored in AuthStore is detected.

View Source src/components/Atlas.tsx, line 112

#### # static registerAppStateChangeHandler()

useEffect hook that is responsible for registering an appState "change" handler that will call `checkToken` each time the app is opened or closed on the device.

View Source src/components/Atlas.tsx, line 91

#### # async inner checkToken()

Checks if there is an access token available in AuthStore, then checks if that access token is valid by calling the API. If the response is valid, the access token will be stored in memory, otherwise the user will be directed to intro screen.

View Source src/components/Atlas.tsx, line 46