Follow button 1/2 way there

This commit is contained in:
Adolfo Reyna
2022-12-22 14:48:34 -05:00
parent 44c5bf0eea
commit 9a38d7ba0b

View File

@@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react';
import { Button } from 'react-native-paper';
import { IconButton } from 'react-native-paper';
import API from './../../API.js';
import { useSnapshot } from 'valtio';
import GlobalState from '../../contexts/GlobalState.js';
@@ -69,7 +69,10 @@ let FollowButton = ({ profile }) => {
<>
{
profile._id && profile._id !== viewer._id ?
<Button mode='outlined' icon='person-add' onPress={toggleFollowThisProfile} >{action}</Button> :
<IconButton
mode='outlined'
icon={following ? 'person-remove' : 'person-add'}
onPress={toggleFollowThisProfile} /> :
<></>
}
</>