mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-12 08:04:34 +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<*> {
|
mapActivities(): Array<*> {
|
||||||
return this.state.activities.map(
|
return this.state.activities.map(
|
||||||
(activity: Activity, i: number, arr: Array<*>) => {
|
(activity: Activity, i: number, arr: Array<*>) => {
|
||||||
// when the backend bug will be fixed
|
|
||||||
const newDate = new Date(activity.createdAt);
|
const newDate = new Date(activity.createdAt);
|
||||||
// returns a label with "today" if the date of the activity is today
|
// returns a label with "today" if the date of the activity is today
|
||||||
if (i === 0 && newDate.toDateString() === new Date().toDateString()) {
|
if (i === 0 && newDate.toDateString() === new Date().toDateString()) {
|
||||||
return GlobalActivitiesModal.renderActivityDateElement(
|
return GlobalActivitiesModal.renderActivityDateElement(
|
||||||
i,
|
activity.id,
|
||||||
activity,
|
activity,
|
||||||
newDate
|
newDate
|
||||||
);
|
);
|
||||||
|
@ -117,7 +116,7 @@ class GlobalActivitiesModal extends Component<Props, State> {
|
||||||
const parseNewDate = new Date(newDate.toDateString());
|
const parseNewDate = new Date(newDate.toDateString());
|
||||||
if (parsePrevDate.getTime() > parseNewDate.getTime()) {
|
if (parsePrevDate.getTime() > parseNewDate.getTime()) {
|
||||||
return GlobalActivitiesModal.renderActivityDateElement(
|
return GlobalActivitiesModal.renderActivityDateElement(
|
||||||
i,
|
activity.id,
|
||||||
activity,
|
activity,
|
||||||
newDate
|
newDate
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue