mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 08:34:25 +03:00
chat: key mapped components
This commit is contained in:
parent
7f67682297
commit
3d46b16a26
@ -408,6 +408,7 @@ export const Message = ({
|
||||
case 'text':
|
||||
return (
|
||||
<TextContent
|
||||
key={i}
|
||||
api={api}
|
||||
fontSize={1}
|
||||
lineHeight={'20px'}
|
||||
@ -415,10 +416,11 @@ export const Message = ({
|
||||
/>
|
||||
);
|
||||
case 'code':
|
||||
return <CodeContent content={content} />;
|
||||
return <CodeContent key={i} content={content} />;
|
||||
case 'url':
|
||||
return (
|
||||
<Box
|
||||
key={i}
|
||||
flexShrink={0}
|
||||
fontSize={1}
|
||||
lineHeight='20px'
|
||||
@ -455,6 +457,7 @@ export const Message = ({
|
||||
const first = (i) => (i === 0);
|
||||
return (
|
||||
<Mention
|
||||
key={i}
|
||||
first={first(i)}
|
||||
group={group}
|
||||
scrollWindow={scrollWindow}
|
||||
|
@ -91,7 +91,7 @@ const MessageMarkdown = React.memo((props) => {
|
||||
}, []);
|
||||
|
||||
return lines.map((line, i) => (
|
||||
<>
|
||||
<React.Fragment key={i}>
|
||||
{i !== 0 && <Row height={2} />}
|
||||
<ReactMarkdown
|
||||
{...rest}
|
||||
@ -123,7 +123,7 @@ const MessageMarkdown = React.memo((props) => {
|
||||
]
|
||||
]}
|
||||
/>
|
||||
</>
|
||||
</React.Fragment>
|
||||
));
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user