feat(wip): 對話
This commit is contained in:
@@ -1,30 +1,29 @@
|
||||
import RecentChat from "../../api/client_data/RecentChat.ts"
|
||||
import User from "../../api/client_data/User.ts"
|
||||
import ContactsListItem from "./ContactsListItem.jsx"
|
||||
import RecentsListItem from "./RecentsListItem.jsx"
|
||||
import RecentsListItem from "./RecentsListItem.tsx"
|
||||
|
||||
interface Args extends React.HTMLAttributes<HTMLElement> {
|
||||
recentsList: RecentChat[]
|
||||
display: boolean
|
||||
openChatFragment: (id: string) => void
|
||||
}
|
||||
|
||||
export default function RecentsList({
|
||||
recentsList,
|
||||
display,
|
||||
openChatFragment,
|
||||
...props
|
||||
}: Args) {
|
||||
return <mdui-list style={{
|
||||
overflowY: 'auto',
|
||||
paddingRight: '10px',
|
||||
display: display ? undefined : 'none'
|
||||
}}>
|
||||
}} {...props}>
|
||||
{
|
||||
recentsList.map((v) =>
|
||||
<RecentsListItem
|
||||
openChatFragment={openChatFragment}
|
||||
key={v.id}
|
||||
nickName={v.title}
|
||||
avatar={v.avatar}
|
||||
content={v.content} />
|
||||
recentChat={v} />
|
||||
)
|
||||
}
|
||||
</mdui-list>
|
||||
|
||||
Reference in New Issue
Block a user