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

    Type Alias JoinTokenErrorCode

    JoinTokenErrorCode:
        | typeof TOKEN_NOT_FOUND
        | typeof TOKEN_EXPIRED
        | typeof INVALID_PASSWORD
        | typeof USER_NOT_AUTHORIZED
        | typeof ROOM_NOT_ACTIVE
        | null

    Union type of all possible join token error codes.

    function handleError(code: JoinTokenErrorCode) {
    switch (code) {
    case TOKEN_NOT_FOUND:
    return 'Invalid invite link';
    case TOKEN_EXPIRED:
    return 'This invite link has expired';
    case INVALID_PASSWORD:
    return 'Incorrect password';
    case USER_NOT_AUTHORIZED:
    return 'You are not authorized to join with this link';
    case ROOM_NOT_ACTIVE:
    return 'The room is not active yet. Please wait for the host.';
    default:
    return 'An error occurred';
    }
    }