Render text blocks

This commit is contained in:
Ken-Håvard Lieng 2020-06-30 13:24:23 +02:00
parent ca4db66308
commit 307573830a
15 changed files with 662 additions and 345 deletions

View file

@ -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>
);
};

View file

@ -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>
);
};