diff --git a/fittrackee_client/src/components/Dashboard/Calendar.jsx b/fittrackee_client/src/components/Dashboard/Calendar.jsx
index 3109620d..3660485c 100644
--- a/fittrackee_client/src/components/Dashboard/Calendar.jsx
+++ b/fittrackee_client/src/components/Dashboard/Calendar.jsx
@@ -13,13 +13,12 @@ import {
subMonths,
} from 'date-fns'
import { enGB, fr } from 'date-fns/locale'
-import React, { Fragment } from 'react'
+import React from 'react'
import { connect } from 'react-redux'
-import { Link } from 'react-router-dom'
+import CalendarActivities from './CalendarActivities'
import { getMonthActivities } from '../../actions/activities'
import { getDateWithTZ } from '../../utils'
-import { recordsLabels } from '../../utils/activities'
const getStartAndEndMonth = (date, weekStartOnMonday) => {
const monthStart = startOfMonth(date)
@@ -114,36 +113,11 @@ class Calendar extends React.Component {
{formattedDate}
- {dayActivities.map(act => (
-
-
- s.id === act.sport_id)
- .map(s => s.img)}
- title={act.title}
- />
- {act.records.length > 0 && (
-
-
- ` ${
- recordsLabels.filter(
- r => r.record_type === rec.record_type
- )[0].label
- }`
- )}
- />
-
- )}
-
-
- ))}
+
)
diff --git a/fittrackee_client/src/components/Dashboard/CalendarActivities.jsx b/fittrackee_client/src/components/Dashboard/CalendarActivities.jsx
new file mode 100644
index 00000000..f27056a3
--- /dev/null
+++ b/fittrackee_client/src/components/Dashboard/CalendarActivities.jsx
@@ -0,0 +1,42 @@
+import React from 'react'
+import { Link } from 'react-router-dom'
+
+import { recordsLabels } from '../../utils/activities'
+
+export default class CalendarActivities extends React.PureComponent {
+ render() {
+ const { dayActivities, isDisabled, sports } = this.props
+ return (
+ <>
+ {dayActivities.map(act => (
+
+ <>
+ s.id === act.sport_id).map(s => s.img)}
+ title={act.title}
+ />
+ {act.records.length > 0 && (
+
+
+ ` ${
+ recordsLabels.filter(
+ r => r.record_type === rec.record_type
+ )[0].label
+ }`
+ )}
+ />
+
+ )}
+ >
+
+ ))}
+ >
+ )
+ }
+}