revert App.tsx
This commit is contained in:
parent
07118a870f
commit
3d9845e1b3
21
App.tsx
21
App.tsx
@ -1,26 +1,9 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
import React from "react";
|
||||||
import { Alert, Text } from "react-native";
|
import { Text } from "react-native";
|
||||||
import ClientProvider from "./graphql/client";
|
import ClientProvider from "./graphql/client";
|
||||||
import ShotsContainer from "./component/shot";
|
import ShotsContainer from "./component/shot";
|
||||||
import auth, { FirebaseAuthTypes } from '@react-native-firebase/auth';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const App: React.FC = () => {
|
const App: React.FC = () => {
|
||||||
const testFirebaseAuth = async () => {
|
|
||||||
try {
|
|
||||||
// Attempt to sign in anonymously
|
|
||||||
const userCredential: FirebaseAuthTypes.UserCredential = await auth().signInAnonymously();
|
|
||||||
console.log('Signed in anonymously, User:', userCredential.user);
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error with Firebase Auth:', error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
testFirebaseAuth();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ClientProvider>
|
<ClientProvider>
|
||||||
<ShotsContainer />
|
<ShotsContainer />
|
||||||
|
Loading…
Reference in New Issue
Block a user