Merge branch '250328_like_dislike'

This commit is contained in:
nevermoregb 2025-03-28 13:08:36 +09:00
commit 9bfd16efa2
2 changed files with 11 additions and 4 deletions

View File

@ -33,13 +33,20 @@
</template> </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>
</div> </div>
</template> </template>
<script setup> <script setup>
import { computed, defineProps, defineEmits, inject } from 'vue'; import { computed, defineProps, defineEmits, inject, onMounted } from 'vue';
import DeleteButton from '../button/DeleteBtn.vue'; import DeleteButton from '../button/DeleteBtn.vue';
import EditButton from '../button/EditBtn.vue'; import EditButton from '../button/EditBtn.vue';
import BoardRecommendBtn from '../button/BoardRecommendBtn.vue'; import BoardRecommendBtn from '../button/BoardRecommendBtn.vue';

View File

@ -341,8 +341,6 @@
dislikeCount: comment.dislikeCount || 0, dislikeCount: comment.dislikeCount || 0,
profileImg: comment.profileImg || '', profileImg: comment.profileImg || '',
nickname: comment.LOCCMTNIC || '', nickname: comment.LOCCMTNIC || '',
likeClicked: comment.likeClicked || false,
dislikeClicked: comment.dislikeClicked || false,
createdAtRaw: comment.LOCCMTRDT, // createdAtRaw: comment.LOCCMTRDT, //
// createdAt: formattedDate(comment.LOCCMTRDT), // () // createdAt: formattedDate(comment.LOCCMTRDT), // ()
// createdAtRaw: new Date(comment.LOCCMTUDT), // // createdAtRaw: new Date(comment.LOCCMTUDT), //
@ -351,6 +349,8 @@
(comment.content === '삭제된 댓글입니다' && comment.LOCCMTUDT !== comment.LOCCMTRDT ? ' (수정됨)' : ''), // () (comment.content === '삭제된 댓글입니다' && comment.LOCCMTUDT !== comment.LOCCMTRDT ? ' (수정됨)' : ''), // ()
children: [], // children: [], //
updateAtRaw: comment.LOCCMTUDT, updateAtRaw: comment.LOCCMTUDT,
likeClicked: comment.myReaction == 1,
dislikeClicked: comment.myReaction == 2,
})) }))
.sort((a, b) => b.createdAtRaw - a.createdAtRaw); .sort((a, b) => b.createdAtRaw - a.createdAtRaw);