about summary refs log tree commit diff
path: root/src/view/com/profile/FollowButton.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-04-05 18:56:02 -0500
committerGitHub <noreply@github.com>2023-04-05 18:56:02 -0500
commitea04c2bd330dc5b46d6f9df0d7d4619bbd8f56d0 (patch)
tree870c7d3dbffe1f382cba30b858eaa2b76b31af36 /src/view/com/profile/FollowButton.tsx
parent8e28d3c6be8e063b6d563b0068cb4fc907ff5df0 (diff)
downloadvoidsky-ea04c2bd330dc5b46d6f9df0d7d4619bbd8f56d0.tar.zst
Add user invite codes (#393)
* Add mobile UIs for invite codes

* Update invite code UIs for web

* Finish implementing invite code behaviors (including notifications of invited users)

* Bump deps

* Update web right nav to use real data; also fix lint
Diffstat (limited to 'src/view/com/profile/FollowButton.tsx')
-rw-r--r--src/view/com/profile/FollowButton.tsx14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/view/com/profile/FollowButton.tsx b/src/view/com/profile/FollowButton.tsx
index f799e26f2..7e25fd88a 100644
--- a/src/view/com/profile/FollowButton.tsx
+++ b/src/view/com/profile/FollowButton.tsx
@@ -6,13 +6,15 @@ import {useStores} from 'state/index'
 import * as Toast from '../util/Toast'
 import {FollowState} from 'state/models/cache/my-follows'
 
-const FollowButton = observer(
+export const FollowButton = observer(
   ({
-    type = 'inverted',
+    unfollowedType = 'inverted',
+    followedType = 'inverted',
     did,
     onToggleFollow,
   }: {
-    type?: ButtonType
+    unfollowedType?: ButtonType
+    followedType?: ButtonType
     did: string
     onToggleFollow?: (v: boolean) => void
   }) => {
@@ -48,12 +50,12 @@ const FollowButton = observer(
 
     return (
       <Button
-        type={followState === FollowState.Following ? 'default' : type}
+        type={
+          followState === FollowState.Following ? followedType : unfollowedType
+        }
         onPress={onToggleFollowInner}
         label={followState === FollowState.Following ? 'Unfollow' : 'Follow'}
       />
     )
   },
 )
-
-export default FollowButton