Render text blocks
This commit is contained in:
parent
ca4db66308
commit
307573830a
15 changed files with 662 additions and 345 deletions
|
@ -1,5 +1,6 @@
|
|||
import React, { memo } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import Text from 'components/Text';
|
||||
import stringToRGB from 'utils/color';
|
||||
|
||||
const Message = ({ message, coloredNick, onNickClick }) => {
|
||||
|
@ -38,7 +39,10 @@ const Message = ({ message, coloredNick, onNickClick }) => {
|
|||
{message.from}
|
||||
</span>
|
||||
)}
|
||||
<span> {message.content}</span>
|
||||
<span>
|
||||
{' '}
|
||||
<Text coloredNick={coloredNick}>{message.content}</Text>
|
||||
</span>
|
||||
</p>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, { memo } from 'react';
|
||||
import Text from 'components/Text';
|
||||
import { timestamp, linkify } from 'utils';
|
||||
|
||||
const SearchResult = ({ result }) => {
|
||||
|
@ -16,7 +17,10 @@ const SearchResult = ({ result }) => {
|
|||
{' '}
|
||||
<span className="message-sender">{result.from}</span>
|
||||
</span>
|
||||
<span> {linkify(result.content)}</span>
|
||||
<span>
|
||||
{' '}
|
||||
<Text>{linkify(result.content)}</Text>
|
||||
</span>
|
||||
</p>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue