forked from p15670423/monkey
Fixed error +warning in UI
Error - didn't use deep copy and caused error Warning - 2 events might have the same timestamp
This commit is contained in:
parent
4581376d8d
commit
7f98f55e64
|
@ -15,10 +15,10 @@ export default class EventsTimeline extends Component {
|
||||||
<div>
|
<div>
|
||||||
<Timeline>
|
<Timeline>
|
||||||
{
|
{
|
||||||
this.props.events.map(event => {
|
this.props.events.map((event, index) => {
|
||||||
const event_time = new Date(event.timestamp['$date']).toString();
|
const event_time = new Date(event.timestamp['$date']).toString();
|
||||||
return (<TimelineEvent
|
return (<TimelineEvent
|
||||||
key={event.timestamp['$date']}
|
key={index}
|
||||||
createdAt={event_time}
|
createdAt={event_time}
|
||||||
title={event.title}
|
title={event.title}
|
||||||
icon={<i className={eventTypeToIcon[event.event_type]} />}>
|
icon={<i className={eventTypeToIcon[event.event_type]} />}>
|
||||||
|
|
|
@ -21,7 +21,7 @@ const columns = [
|
||||||
class PillarOverview extends Component {
|
class PillarOverview extends Component {
|
||||||
render() {
|
render() {
|
||||||
const data = this.props.grades.map((grade) => {
|
const data = this.props.grades.map((grade) => {
|
||||||
const newGrade = grade;
|
const newGrade = JSON.parse(JSON.stringify(grade));
|
||||||
newGrade.pillar = {name: grade.pillar, status: this.props.pillarsToStatuses[grade.pillar]};
|
newGrade.pillar = {name: grade.pillar, status: this.props.pillarsToStatuses[grade.pillar]};
|
||||||
return newGrade;
|
return newGrade;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue