UNPKG

@plteam/chat-ui

Version:

CUI Kit is a free and open-source library for creating AI assistant chat interfaces, built with React, Material UI, and TypeScript

9 lines (8 loc) 522 B
import * as React from 'react'; import ThreadListItem from './ThreadListItem'; import { useObserverValue } from '../hooks/useObserverValue'; const ThreadListItemObserver = ({ thread, setThread, model, slots }) => { const currentThread = useObserverValue(model.currentThread); return (React.createElement(ThreadListItem, { selected: thread.id === currentThread?.id, setThread: setThread, thread: thread, listModel: model.listGroups, model: model, slots: slots })); }; export default ThreadListItemObserver;