Fixed comments control in the article footer
This commit is contained in:
parent
bf0d96be19
commit
13fb802365
|
@ -354,9 +354,12 @@ export const FullArticle = (props: Props) => {
|
|||
<div class={clsx(styles.shoutStatsItem)} ref={triggerRef} onClick={scrollToComments}>
|
||||
<Icon name="comment" class={styles.icon} />
|
||||
<Icon name="comment-hover" class={clsx(styles.icon, styles.iconHover)} />
|
||||
<span class={styles.commentsTextLabel}>
|
||||
{props.article.stat?.commented || t('Add' + ' comment')}
|
||||
</span>
|
||||
<Show
|
||||
when={props.article.stat?.commented}
|
||||
fallback={<span class={styles.commentsTextLabel}>{t('Add comment')}</span>}
|
||||
>
|
||||
{props.article.stat?.commented}
|
||||
</Show>
|
||||
</div>
|
||||
)}
|
||||
</Popover>
|
||||
|
|
|
@ -230,9 +230,16 @@ export const ArticleCard = (props: ArticleCardProps) => {
|
|||
name="comment-hover"
|
||||
class={clsx(styles.icon, styles.iconHover, styles.feedControlIcon)}
|
||||
/>
|
||||
<Show
|
||||
when={props.article.stat?.commented}
|
||||
fallback={
|
||||
<span class={clsx(styles.shoutCardLinkContainer, styles.shoutCardDetailsItemLabel)}>
|
||||
{props.article.stat?.commented || t('Add comment')}
|
||||
{t('Add comment')}
|
||||
</span>
|
||||
}
|
||||
>
|
||||
{props.article.stat?.commented}
|
||||
</Show>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user