Created
January 14, 2019 15:19
-
-
Save aloukissas/d59b2c5b57f6a773c3e0371e23d72a0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { createAppContainer } from "react-navigation"; | |
import Amplify from "aws-amplify"; | |
import { createRootNavigator } from "./router"; | |
import config from "./config"; | |
Amplify.configure({ | |
Auth: { | |
mandatorySignIn: true, | |
region: config.AWS.cognito.REGION, | |
userPoolId: config.AWS.cognito.USER_POOL_ID, | |
identityPoolId: config.AWS.cognito.IDENTITY_POOL_ID, | |
userPoolWebClientId: config.AWS.cognito.APP_CLIENT_ID | |
} | |
}); | |
class App extends React.Component { | |
render() { | |
const RootNavigator = createRootNavigator(/*isAuthenticated=*/ false); | |
const AppContainer = createAppContainer(RootNavigator); | |
return ( | |
<AppContainer /> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment