Merge branch '250328_like_dislike'
This commit is contained in:
commit
9bfd16efa2
@ -33,13 +33,20 @@
|
||||
</template>
|
||||
|
||||
<!-- 좋아요, 싫어요 버튼 (댓글에서만 표시) -->
|
||||
<BoardRecommendBtn v-if="isLike && !isDeletedComment" :boardId="boardId" :comment="comment" @updateReaction="handleUpdateReaction" />
|
||||
<BoardRecommendBtn
|
||||
v-if="isLike && !isDeletedComment"
|
||||
:boardId="boardId"
|
||||
:comment="comment"
|
||||
:likeClicked="comment.likeClicked"
|
||||
:dislikeClicked="comment.dislikeClicked"
|
||||
@updateReaction="handleUpdateReaction"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, defineProps, defineEmits, inject } from 'vue';
|
||||
import { computed, defineProps, defineEmits, inject, onMounted } from 'vue';
|
||||
import DeleteButton from '../button/DeleteBtn.vue';
|
||||
import EditButton from '../button/EditBtn.vue';
|
||||
import BoardRecommendBtn from '../button/BoardRecommendBtn.vue';
|
||||
|
||||
@ -341,8 +341,6 @@
|
||||
dislikeCount: comment.dislikeCount || 0,
|
||||
profileImg: comment.profileImg || '',
|
||||
nickname: comment.LOCCMTNIC || '',
|
||||
likeClicked: comment.likeClicked || false,
|
||||
dislikeClicked: comment.dislikeClicked || false,
|
||||
createdAtRaw: comment.LOCCMTRDT, // 작성일
|
||||
// createdAt: formattedDate(comment.LOCCMTRDT), // 작성일(노출용)
|
||||
// createdAtRaw: new Date(comment.LOCCMTUDT), // 수정순
|
||||
@ -351,6 +349,8 @@
|
||||
(comment.content === '삭제된 댓글입니다' && comment.LOCCMTUDT !== comment.LOCCMTRDT ? ' (수정됨)' : ''), // 수정일(노출용)
|
||||
children: [], // 대댓글을 담을 배열
|
||||
updateAtRaw: comment.LOCCMTUDT,
|
||||
likeClicked: comment.myReaction == 1,
|
||||
dislikeClicked: comment.myReaction == 2,
|
||||
}))
|
||||
.sort((a, b) => b.createdAtRaw - a.createdAtRaw);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user