mirror of https://github.com/halo-dev/halo
Fix pending comments calculation in post list item (#7703)
#### What type of PR is this? /area ui /kind bug /milestone 2.21.x #### What this PR does / why we need it: Fix pending comments calculation in post list item #### Does this PR introduce a user-facing change? ```release-note None ```pull/7711/head
parent
157a8eb42d
commit
568ebf5b70
|
@ -38,11 +38,7 @@ const commentText = computed(() => {
|
|||
comments: totalComment || 0,
|
||||
});
|
||||
|
||||
if (!totalComment || !approvedComment) {
|
||||
return text;
|
||||
}
|
||||
|
||||
const pendingComments = totalComment - approvedComment;
|
||||
const pendingComments = (totalComment || 0) - (approvedComment || 0);
|
||||
|
||||
if (pendingComments > 0) {
|
||||
text += t("core.page.list.fields.comments-with-pending", {
|
||||
|
|
|
@ -39,11 +39,7 @@ const commentText = computed(() => {
|
|||
comments: totalComment || 0,
|
||||
});
|
||||
|
||||
if (!totalComment || !approvedComment) {
|
||||
return text;
|
||||
}
|
||||
|
||||
const pendingComments = totalComment - approvedComment;
|
||||
const pendingComments = (totalComment || 0) - (approvedComment || 0);
|
||||
|
||||
if (pendingComments > 0) {
|
||||
text += t("core.post.list.fields.comments-with-pending", {
|
||||
|
|
|
@ -48,11 +48,7 @@ const commentText = computed(() => {
|
|||
comments: totalComment || 0,
|
||||
});
|
||||
|
||||
if (!totalComment || !approvedComment) {
|
||||
return text;
|
||||
}
|
||||
|
||||
const pendingComments = totalComment - approvedComment;
|
||||
const pendingComments = (totalComment || 0) - (approvedComment || 0);
|
||||
|
||||
if (pendingComments > 0) {
|
||||
text += t(
|
||||
|
|
Loading…
Reference in New Issue