i learning react native now, and i have case how to hide the buttom nav if their already login and cant back to login activity ? i make some logic before but always error , how i can solve it ? thank you
this my code
const Icon = async () => {
if (label === "Home") return isFocused ? <HomeActive /> : <HomeDeactive />
if (label === "Posts") return isFocused ? <PostActive /> : <Post />
if (await isAuthenticated() !== null) {
return isFocused ? <HomeActive /> : <HomeDeactive />
}
if (label === "Accounts") return isFocused ? <AccountActive /> : <Account />
if (label === "Remas") return isFocused ? <MosqueActive /> : <Mosque />
return <HomeDeactive />
}