livekit-dgn/components/ChatEntry.tsx
2022-10-24 17:03:12 +02:00

19 lines
426 B
TypeScript

import { HStack, Text } from '@chakra-ui/react';
import { Participant } from 'livekit-client';
export interface ChatData {
sentAt: Date;
message: string;
from?: Participant;
}
const ChatEntry = ({ message, from }: ChatData) => {
return (
<HStack>
{from ? <Text fontWeight={600}>{`${from.name || from.identity}`}:</Text> : null}
<Text>{message}</Text>
</HStack>
);
};
export default ChatEntry;