Hiyve Components - v1.0.0
    Preparing search index...
    • AnswerSection displays existing answers and an input field for submitting new answers.

      Parameters

      Returns ReactElement<any, string | JSXElementConstructor<any>> | null

      This component handles multiple answers and community answering:

      1. Answered: Shows all answers with author info, "(you)" indicator, and "Answered" badge
      2. Answering: Shows an input field for submitting a new answer

      Answer Permissions:

      • Room owner can always answer any question
      • Other participants can answer when question.isOpenForAnswers is true

      Multiple Answers:

      • Renders from answers array
      • Each answer shows author avatar, name, timestamp, and content
      • Accepted answers (typically owner's first answer) show "Answered" badge
      <AnswerSection
      question={question}
      isOwner={true}
      isAnswering={false}
      onAnswer={(content) => answerQuestion(question.id, content)}
      onToggleAnswering={() => setAnsweringId(question.id)}
      labels={labels}
      icons={icons}
      colors={colors}
      styles={styles}
      />