diff --git a/example/src/App.tsx b/example/src/App.tsx index 5fc7280..c72b91c 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -3,7 +3,7 @@ import { StyleSheet, View, Text, Button } from 'react-native'; import { GameCenterAuth, PlayGamesAuth } from 'react-native-game-auth'; export default function App() { - const [result, setResult] = React.useState(); + const [result, setResult] = React.useState(undefined); const [json, setJson] = React.useState(); const psAuthStateChanged = (isSignedIn: boolean): void => { @@ -23,7 +23,7 @@ export default function App() { const x = GameCenterAuth.onAuthenticate((i) => { setResult(i); }); - GameCenterAuth.initAuth(); + GameCenterAuth.initAuth(false); return () => { x.remove(); }; @@ -34,16 +34,18 @@ export default function App() { return ( - {result ? 'Authenticated' : 'Not authenticated'} + {result ? 'Authenticated' : 'Not authenticated ' + result}