{"size": 1135, "ext": "js", "max_stars_repo_path": "App.js", "max_stars_repo_name": "iamrommel/RylaFlashCard", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "App.js", "max_issues_repo_name": "iamrommel/RylaFlashCard", "max_issues_repo_issues_event_min_datetime": "2021-10-06T08:48:52.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T21:20:32.000Z", "max_forks_repo_path": "App.js", "max_forks_repo_name": "iamrommel/RylaFlashCard", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 28.375, "max_line_length": 72, "alphanum_fraction": 0.6387665198}
import React, { useEffect, useState } from 'react'
import { StyleProvider, Container } from 'native-base'
import getTheme from './native-base-theme/components'
import commonColor from './native-base-theme/variables/commonColor'
import { StatusBar } from 'react-native'
import { loadAsync } from 'expo-font'
import { logToSentry } from './src/config/sentry'
import AppNavigator from './src/AppNavigator'

export default function App() {
  const [ready, setReady] = useState(false)

  useEffect(() => {
    //self invoke for async operation which is legal on react hooks
    ;(async () => {
      try {
        //setup the new font
        await loadAsync({
          Roboto: require('native-base/Fonts/Roboto.ttf'),
          Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'),
        })

        //set the flag the everything is ready
        setReady(true)
      } catch (error) {
        logToSentry(error)
      }
    })()
  }, [])

  return (
    <React.Fragment>
      <StatusBar hidden />
      <StyleProvider style={getTheme(commonColor)}>
        <AppNavigator />
      </StyleProvider>
    </React.Fragment>
  )
}
