Fix follow button showing on own profile
This commit is contained in:
parent
4304178be6
commit
78b26f3de9
|
@ -52,6 +52,15 @@ exports.authorView = ({
|
|||
? 'unfollow'
|
||||
: 'follow'
|
||||
|
||||
// We're on our own profile!
|
||||
const contactForm = relationship !== null
|
||||
? form({ action: `/${contactFormType}/${encodeURIComponent(feedId)}`, method: 'post' },
|
||||
button({
|
||||
type: 'submit'
|
||||
},
|
||||
contactFormType))
|
||||
: null
|
||||
|
||||
const prefix = section({ class: 'message' },
|
||||
header({ class: 'profile' },
|
||||
img({ class: 'avatar', src: avatarUrl }),
|
||||
|
@ -66,11 +75,7 @@ exports.authorView = ({
|
|||
footer(
|
||||
a({ href: `/likes/${encodeURIComponent(feedId)}` }, 'view likes'),
|
||||
span(relationship),
|
||||
form({ action: `/${contactFormType}/${encodeURIComponent(feedId)}`, method: 'post' },
|
||||
button({
|
||||
type: 'submit'
|
||||
},
|
||||
contactFormType))
|
||||
contactForm
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue