mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-02 13:12:13 +08:00
fixes list keys
This commit is contained in:
parent
eb8124ea5a
commit
455534ef9a
1 changed files with 2 additions and 3 deletions
|
@ -97,12 +97,11 @@ class GlobalActivitiesModal extends Component<Props, State> {
|
|||
mapActivities(): Array<*> {
|
||||
return this.state.activities.map(
|
||||
(activity: Activity, i: number, arr: Array<*>) => {
|
||||
// when the backend bug will be fixed
|
||||
const newDate = new Date(activity.createdAt);
|
||||
// returns a label with "today" if the date of the activity is today
|
||||
if (i === 0 && newDate.toDateString() === new Date().toDateString()) {
|
||||
return GlobalActivitiesModal.renderActivityDateElement(
|
||||
i,
|
||||
activity.id,
|
||||
activity,
|
||||
newDate
|
||||
);
|
||||
|
@ -117,7 +116,7 @@ class GlobalActivitiesModal extends Component<Props, State> {
|
|||
const parseNewDate = new Date(newDate.toDateString());
|
||||
if (parsePrevDate.getTime() > parseNewDate.getTime()) {
|
||||
return GlobalActivitiesModal.renderActivityDateElement(
|
||||
i,
|
||||
activity.id,
|
||||
activity,
|
||||
newDate
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue