mirror of
https://github.com/urbit/shrub.git
synced 2024-11-27 18:34:48 +03:00
link fe: use correct time attribute
This commit is contained in:
parent
182d2c3a07
commit
50695fe78a
@ -36,7 +36,7 @@ export class LinkDetail extends Component {
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.props.data.timestamp !== prevProps.data.timestamp) {
|
||||
if (this.props.data.time !== prevProps.data.time) {
|
||||
this.setState({timeSinceLinkPost: this.getTimeSinceLinkPost()})
|
||||
}
|
||||
|
||||
@ -53,8 +53,8 @@ export class LinkDetail extends Component {
|
||||
}
|
||||
|
||||
getTimeSinceLinkPost() {
|
||||
return !!this.props.data.timestamp ?
|
||||
moment.unix(this.props.data.timestamp / 1000).from(moment.utc())
|
||||
return !!this.props.data.time ?
|
||||
moment.unix(this.props.data.time / 1000).from(moment.utc())
|
||||
: '';
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ export class Links extends Component {
|
||||
let LinkList = Object.keys(links)
|
||||
.map((link) => {
|
||||
let linksObj = props.links[linkPage];
|
||||
let { title, url, timestamp, ship } = linksObj[link];
|
||||
let { title, url, time, ship } = linksObj[link];
|
||||
let members = {};
|
||||
|
||||
const commentCount = props.comments[url]
|
||||
@ -71,12 +71,12 @@ export class Links extends Component {
|
||||
|
||||
return (
|
||||
<LinkItem
|
||||
key={timestamp}
|
||||
key={time}
|
||||
title={title}
|
||||
page={props.page}
|
||||
index={link}
|
||||
url={url}
|
||||
timestamp={timestamp}
|
||||
timestamp={time}
|
||||
nickname={nickname}
|
||||
ship={ship}
|
||||
color={color}
|
||||
|
Loading…
Reference in New Issue
Block a user