fixed the fix
Previous fix did not take into account "unfollow". Now it does
This commit is contained in:
parent
a5ae700b92
commit
2c86eb5cf1
|
@ -631,21 +631,22 @@ exports.authorView = ({
|
|||
relationship.following === true &&
|
||||
relationship.blocking === false;
|
||||
|
||||
const contactFormType = areFollowing ? i18n.unfollow : i18n.follow;
|
||||
const contactFormType = areFollowing ? 'unfollow' : 'follow';
|
||||
const contactFormTypeLabel = areFollowing ? i18n.unfollow : i18n.follow;
|
||||
|
||||
const contactForm =
|
||||
relationship === null
|
||||
? null // We're on our own profile!
|
||||
: form(
|
||||
{
|
||||
action: `/follow/${encodeURIComponent(feedId)}`,
|
||||
action: `/${contactFormType}/${encodeURIComponent(feedId)}`,
|
||||
method: "post",
|
||||
},
|
||||
button(
|
||||
{
|
||||
type: "submit",
|
||||
},
|
||||
contactFormType
|
||||
contactFormTypeLabel
|
||||
)
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue