File size: 852 Bytes
dc9e27a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { useEffect, useState, useRef, useMemo, useContext } from 'react';
import styles from './index.module.less';
import Answer from '../answer';

const SessionItem = ({ item, handleNodeClick, idx }: any) => {
    return <>
        <div className={styles.questionArea}>
            <div className={styles.avatar}></div>
            <div className={styles.question}>
                <span>{item.question}</span>
            </div>
        </div>
        <Answer
            key={`answer-item-${idx}`}
            listId={idx}
            response={item?.response || ''}
            refList={item?.responseRefList}
            isEnd={item?.isEnd || item?.chatIsOver || false}
            adjList={item.adjacency_list}
            handleNodeClick={handleNodeClick}
            question={item?.question}
        />
    </>
};

export default SessionItem;