hiding action panel if not logged in

This commit is contained in:
Nouman Tahir 2021-09-16 13:01:58 +05:00
parent 4745f19f07
commit e0b0040a0c
2 changed files with 7 additions and 2 deletions

View File

@ -12,6 +12,7 @@ interface ActionPanelProps {
}
export const ActionPanel = ({isFollowing, isFavourite, onFavouritePress, onFollowPress}: ActionPanelProps) => {
return (
<View style={styles.actionPanel}>
<IconButton

View File

@ -33,6 +33,7 @@ export const QuickProfileContent = ({
const currentAccount = useAppSelector((state)=>state.account.currentAccount);
const pinCode = useAppSelector((state)=>state.application.pin);
const isLoggedIn = useAppSelector((state)=>state.application.isLoggedIn);
const [isLoading, setIsLoading] = useState(false);
const [user, setUser] = useState(null);
@ -259,12 +260,15 @@ export const QuickProfileContent = ({
text='VIEW FULL PROFILE'
onPress={_openFullProfile}
/>
<ActionPanel
{isLoggedIn && (
<ActionPanel
isFollowing={isFollowing}
isFavourite={isFavourite}
onFavouritePress={_onFavouritePress}
onFollowPress={_onFollowPress}
/>
/>
)}
</View>
)
};