Skip to content

[QUIZ-144][QUIZ-167] feat: handle realtime comment #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 11, 2024
Merged

Conversation

trungdong11
Copy link
Contributor

No description provided.

}

const props = defineProps<{
refComment?: boolean
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

focusOnMount

}

const props = defineProps<{
refComment?: boolean
idPost: string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

postId

const metaPage = ref<IPaging>()
const isLoading = ref(true)

onMounted(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onBeforeMount

})

watch(getMessage, (val: any) => {
if (val.event === 'commentPost') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (val.event === 'commentPost' && val.data.parent_comment_id) 

<PopoverContent class="p-0 w-full">
<div
class="rounded-md cursor-pointer py-1 px-1.5 shadow-md bg-white"
@click.prevent.stop="handleDeleteComment(el.id)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete comment k cần confirm hà

onMounted(() => {
if (useAuthStore().getUser?.id) {
useSocketStore().setupGroupSocketStore()
console.log('group socket init')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xoa console log


onMounted(() => {
if (useAuthStore().getUser?.id) {
useSocketStore().setupGroupSocketStore()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sao k setup socket ở main.js luôn m

})

watch(getMessage, (val: any) => {
if (val.event === 'commentPost') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (val.event === 'commentPost' && val.data.parent_comment_id) {

})
}
},
setCommentByPostId(data: any) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont use any

el.isShowReply = false
})
},
handleCommentByPostId(data: any) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done use any

@huynamboz huynamboz merged commit f7badc9 into master Dec 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants