fix: review comments and frontend build issue in label_initial_prompt.tsx due to previous message_id changes

This commit is contained in:
James Melvin
2023-01-08 11:19:01 +05:30
parent d4fdaeca81
commit e39602cf7c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ export interface Message {
export const Messages = ({ messages, post_id }: { messages: Message[]; post_id: string }) => {
const items = messages.map((messageProps: Message, i: number) => {
const { text } = messageProps;
const { message_id } = messageProps;
const { text } = messageProps;
return (
<FlaggableElement text={text} post_id={post_id} message_id={message_id} key={i + text}>
<MessageView {...messageProps} />
@@ -24,7 +24,7 @@ export const Messages = ({ messages, post_id }: { messages: Message[]; post_id:
return <Grid gap={2}>{items}</Grid>;
};
export const MessageView = ({ is_assistant, text }: Message) => {
export const MessageView = ({ is_assistant, text, message_id }: Message) => {
const { colorMode } = useColorMode();
const bgColor = useMemo(() => {