Hiyve Components - v1.0.0
    Preparing search index...

    Represents an answer to a question.

    Questions can have multiple answers when opened for community responses. The owner's first answer is automatically marked as isAccepted, which also sets the question's isAnswered flag to true.

    Answer Types:

    • Accepted (official): Set by owner, displayed with "Answered" badge
    • Community answer: Submitted by any participant when question is open
    const answer: Answer = {
    id: 'a-123',
    authorId: 'user-789',
    authorName: 'Jane Doe',
    content: 'The session ends at 5:00 PM.',
    answeredAt: Date.now(),
    isAccepted: true, // Official answer from owner
    };
    interface Answer {
        answeredAt: number;
        authorId: string;
        authorName?: string;
        content: string;
        id: string;
        isAccepted?: boolean;
    }
    Index

    Properties

    answeredAt: number

    Timestamp when the answer was provided

    authorId: string

    User ID of the person who answered

    authorName?: string

    Display name of the answerer

    content: string

    Answer content (plain text)

    id: string

    Unique identifier for the answer

    isAccepted?: boolean

    Whether this is the official/accepted answer (set by owner)