about summary refs log tree commit diff
path: root/src/components/ProfileCard.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ProfileCard.tsx')
-rw-r--r--src/components/ProfileCard.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/ProfileCard.tsx b/src/components/ProfileCard.tsx
index 7bec14b9c..78d86ab36 100644
--- a/src/components/ProfileCard.tsx
+++ b/src/components/ProfileCard.tsx
@@ -286,6 +286,7 @@ export type FollowButtonProps = {
   logContext: LogEvents['profile:follow']['logContext'] &
     LogEvents['profile:unfollow']['logContext']
   colorInverted?: boolean
+  onFollow?: () => void
 } & Partial<ButtonProps>
 
 export function FollowButton(props: FollowButtonProps) {
@@ -299,6 +300,7 @@ export function FollowButtonInner({
   moderationOpts,
   logContext,
   onPress: onPressProp,
+  onFollow,
   colorInverted,
   ...rest
 }: FollowButtonProps) {
@@ -325,6 +327,7 @@ export function FollowButtonInner({
         ),
       )
       onPressProp?.(e)
+      onFollow?.()
     } catch (err: any) {
       if (err?.name !== 'AbortError') {
         Toast.show(_(msg`An issue occurred, please try again.`), 'xmark')