import React from 'react'
import { Text } from 'react-native'
import { useMaybeDoormanUser } from 'react-native-doorman'
const MaybeUserDetails = () => {
// 👇 notice that the ARRAY syntax (not {} this time!)
const [user, signOut] = useMaybeDoormanUser()
// check if the user is defined or not first
// if it isn't, then no one is signed in yet!
return <Text>Not signed in yet!</Text>
// Ok, now we now there is a user! 🔥
const phoneNumber = user.phoneNumber
return <Text>uid: {uid}, phone: {phoneNumber}</Text>
export default MaybeUserDetails