Skip to content

Commit

Permalink
Merge pull request #125 from art-by-city/118-follow-button-mobile-hover
Browse files Browse the repository at this point in the history
Fix for follow button on mobile hover (isHovering must be true)
  • Loading branch information
jim-toth authored Feb 14, 2024
2 parents cb50256 + 015e5ca commit 93aa0f6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions components/FollowButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:disabled="pending || loading"
:loading="pending || loading"
:prepend-icon="followActionIcon(isHovering)"
@click="onFollowClick"
@click="onFollowClick(isHovering)"
>
{{ followActionText(isHovering) }}
<template #loader>
Expand Down Expand Up @@ -73,7 +73,12 @@ const textColor = computed(() => {
? '#FF5252' : ''
})
const onFollowClick = debounce(async () => {
const onFollowClick = debounce(async (isHovering?: boolean) => {
// NB: On mobile, the first click isHovering will be falsy, so we skip.
if (!isHovering) {
return
}
loading.value = true
const contract = await abc.connect().following.getContract(props.owner)
Expand Down

0 comments on commit 93aa0f6

Please sign in to comment.