|
@@ -14,15 +14,15 @@ const LatestPost = (props: {
|
|
startTime: number;
|
|
startTime: number;
|
|
}) => {
|
|
}) => {
|
|
const { selectThread, post, startTime } = props;
|
|
const { selectThread, post, startTime } = props;
|
|
- const { author, createdAt, id, thread, text } = post;
|
|
|
|
|
|
+ const { author = {}, createdAt, id, thread, threadId, text } = post;
|
|
const created = moment(startTime + createdAt * 6000);
|
|
const created = moment(startTime + createdAt * 6000);
|
|
- if (!created.isValid) console.debug(`created`, createdAt, startTime, created);
|
|
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<div
|
|
<div
|
|
key={id}
|
|
key={id}
|
|
className="box text-left"
|
|
className="box text-left"
|
|
onClick={
|
|
onClick={
|
|
- thread && selectThread ? () => props.selectThread(thread.id) : () => {}
|
|
|
|
|
|
+ thread && selectThread ? () => props.selectThread(threadId) : () => {}
|
|
}
|
|
}
|
|
>
|
|
>
|
|
<div className="mb-2">
|
|
<div className="mb-2">
|
|
@@ -30,12 +30,12 @@ const LatestPost = (props: {
|
|
<User key={author.id} id={author.id} handle={author.handle} />
|
|
<User key={author.id} id={author.id} handle={author.handle} />
|
|
posted in
|
|
posted in
|
|
<Link
|
|
<Link
|
|
- to={`/forum/threads/${thread.id}`}
|
|
|
|
|
|
+ to={`/forum/threads/${threadId}`}
|
|
className="font-weight-bold mx-2"
|
|
className="font-weight-bold mx-2"
|
|
>
|
|
>
|
|
- {thread ? thread.title : `Thread ${thread.id}`}
|
|
|
|
|
|
+ {thread ? thread?.title : `Thread ${threadId}`}
|
|
</Link>
|
|
</Link>
|
|
- <a href={`${domain}/#/forum/threads/${thread.id}`}>reply</a>
|
|
|
|
|
|
+ <a href={`${domain}/#/forum/threads/${threadId}`}>reply</a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div className="overflow-hidden">
|
|
<div className="overflow-hidden">
|