Skip to main content
Glama
ChatList.tsx1.31 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { Divider, Stack } from '@mantine/core'; import type { Communication } from '@medplum/fhirtypes'; import { Fragment } from 'react'; import type { JSX } from 'react'; import { ChatListItem } from './ChatListItem'; interface ChatListProps { threads: [Communication, Communication | undefined][]; selectedCommunication: Communication | undefined; onSelectedItem: (topic: Communication) => string; } export const ChatList = (props: ChatListProps): JSX.Element => { const { threads, selectedCommunication, onSelectedItem } = props; return ( <Stack gap={0}> {threads.map((thread: [Communication, Communication | undefined]) => { const topicCommunication = thread[0]; const lastCommunication = thread[1]; const _isSelected = selectedCommunication?.id === topicCommunication.id; return ( <Fragment key={topicCommunication.id}> <ChatListItem topic={topicCommunication} lastCommunication={lastCommunication} isSelected={_isSelected} onSelectedItem={onSelectedItem} /> <Divider /> </Fragment> ); })} </Stack> ); };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server