diff --git a/src/view/com/profile/FollowButton.tsx b/src/view/com/profile/FollowButton.tsx index adb496f6d7..569ab9612c 100644 --- a/src/view/com/profile/FollowButton.tsx +++ b/src/view/com/profile/FollowButton.tsx @@ -6,6 +6,17 @@ import {Button, ButtonType} from '../util/forms/Button' import * as Toast from '../util/Toast' import {FollowState} from 'state/models/cache/my-follows' import {useFollowProfile} from 'lib/hooks/useFollowProfile' +import {s} from '#/lib/styles' +import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import {usePalette} from '#/lib/hooks/usePalette' + +type Props = { + unfollowedType?: ButtonType + followedType?: ButtonType + profile: AppBskyActorDefs.ProfileViewBasic + onToggleFollow?: (v: boolean) => void + labelStyle?: StyleProp +} & React.ComponentProps export const FollowButton = observer(function FollowButtonImpl({ unfollowedType = 'inverted', @@ -13,13 +24,11 @@ export const FollowButton = observer(function FollowButtonImpl({ profile, onToggleFollow, labelStyle, -}: { - unfollowedType?: ButtonType - followedType?: ButtonType - profile: AppBskyActorDefs.ProfileViewBasic - onToggleFollow?: (v: boolean) => void - labelStyle?: StyleProp -}) { + ...rest +}: Props) { + const pal = usePalette('default') + const palInverted = usePalette('inverted') + const {state, following, toggle} = useFollowProfile(profile) const onPress = React.useCallback(async () => { @@ -37,11 +46,19 @@ export const FollowButton = observer(function FollowButtonImpl({ return (