Organize components, use webpack import aliases
This commit is contained in:
parent
f174d98107
commit
86c5451edb
50 changed files with 269 additions and 133 deletions
|
@ -1,23 +0,0 @@
|
|||
import React, { PureComponent } from 'react';
|
||||
import { timestamp, linkify } from '../util';
|
||||
|
||||
export default class SearchResult extends PureComponent {
|
||||
render() {
|
||||
const { result } = this.props;
|
||||
const style = {
|
||||
paddingLeft: `${window.messageIndent}px`,
|
||||
textIndent: `-${window.messageIndent}px`
|
||||
};
|
||||
|
||||
return (
|
||||
<p className="search-result" style={style}>
|
||||
<span className="message-time">{timestamp(new Date(result.time * 1000))}</span>
|
||||
<span>
|
||||
{' '}
|
||||
<span className="message-sender">{result.from}</span>
|
||||
</span>
|
||||
<span>{' '}{linkify(result.content)}</span>
|
||||
</p>
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue