import { QA } from '@hiyve/rn-collaboration';
import { useQA } from '@hiyve/rn-collaboration';
function QAPanel() {
const { questions, askQuestion, upvote, answerQuestion } = useQA({
localUserId: userId,
localUserName: userName,
onSendDataMessage: sendData,
isOwner: true,
});
return (
<QA
questions={questions}
localUserId={userId}
isOwner={true}
onAskQuestion={askQuestion}
onUpvote={upvote}
onAnswerQuestion={answerQuestion}
/>
);
}
Q&A interface for asking questions, upvoting, and answering.
All participants can submit questions and upvote existing ones. Questions are sorted by upvote count (highest first). Room owners can provide answers that are displayed beneath the question text.