Make search results look like messages
This commit is contained in:
parent
bd6c0d26eb
commit
a68f5621bc
4 changed files with 45 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import pure from 'pure-render-decorator';
|
||||
import { timestamp } from '../util';
|
||||
import SearchResult from './SearchResult';
|
||||
|
||||
@pure
|
||||
export default class Search extends Component {
|
||||
|
@ -19,9 +19,7 @@ export default class Search extends Component {
|
|||
};
|
||||
|
||||
const results = search.results.map(result => (
|
||||
<p key={result.id}>
|
||||
{timestamp(new Date(result.time * 1000))} {result.from} {result.content}
|
||||
</p>
|
||||
<SearchResult key={result.id} result={result} />
|
||||
));
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue