From 424df3b7214a886fc9935e36face67710be7bacc Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 7 Jun 2018 13:16:52 +0200 Subject: [PATCH] Client: refactor + minor changes --- .../src/components/{Activities => Activity}/ActivityAdd.jsx | 0 .../components/{Activities => Activity}/ActivityAddOrEdit.jsx | 0 .../ActivityDisplay/ActivityCardHeader.jsx | 0 .../{Activities => Activity}/ActivityDisplay/ActivityCharts.jsx | 0 .../ActivityDisplay/ActivityDetails.jsx | 0 .../{Activities => Activity}/ActivityDisplay/ActivityMap.jsx | 0 .../{Activities => Activity}/ActivityDisplay/index.jsx | 0 .../src/components/{Activities => Activity}/ActivityEdit.jsx | 0 .../{Activities => Activity}/ActivityForms/FormWithGpx.jsx | 0 .../{Activities => Activity}/ActivityForms/FormWithoutGpx.jsx | 0 mpwo_client/src/components/{Activities => Activity}/index.jsx | 0 mpwo_client/src/components/App.jsx | 2 +- mpwo_client/src/components/Dashboard/Statistics.jsx | 2 +- mpwo_client/src/components/Dashboard/UserStatistics.jsx | 2 +- mpwo_client/src/components/NavBar/index.jsx | 2 +- 15 files changed, 4 insertions(+), 4 deletions(-) rename mpwo_client/src/components/{Activities => Activity}/ActivityAdd.jsx (100%) rename mpwo_client/src/components/{Activities => Activity}/ActivityAddOrEdit.jsx (100%) rename mpwo_client/src/components/{Activities => Activity}/ActivityDisplay/ActivityCardHeader.jsx (100%) rename mpwo_client/src/components/{Activities => Activity}/ActivityDisplay/ActivityCharts.jsx (100%) rename mpwo_client/src/components/{Activities => Activity}/ActivityDisplay/ActivityDetails.jsx (100%) rename mpwo_client/src/components/{Activities => Activity}/ActivityDisplay/ActivityMap.jsx (100%) rename mpwo_client/src/components/{Activities => Activity}/ActivityDisplay/index.jsx (100%) rename mpwo_client/src/components/{Activities => Activity}/ActivityEdit.jsx (100%) rename mpwo_client/src/components/{Activities => Activity}/ActivityForms/FormWithGpx.jsx (100%) rename mpwo_client/src/components/{Activities => Activity}/ActivityForms/FormWithoutGpx.jsx (100%) rename mpwo_client/src/components/{Activities => Activity}/index.jsx (100%) diff --git a/mpwo_client/src/components/Activities/ActivityAdd.jsx b/mpwo_client/src/components/Activity/ActivityAdd.jsx similarity index 100% rename from mpwo_client/src/components/Activities/ActivityAdd.jsx rename to mpwo_client/src/components/Activity/ActivityAdd.jsx diff --git a/mpwo_client/src/components/Activities/ActivityAddOrEdit.jsx b/mpwo_client/src/components/Activity/ActivityAddOrEdit.jsx similarity index 100% rename from mpwo_client/src/components/Activities/ActivityAddOrEdit.jsx rename to mpwo_client/src/components/Activity/ActivityAddOrEdit.jsx diff --git a/mpwo_client/src/components/Activities/ActivityDisplay/ActivityCardHeader.jsx b/mpwo_client/src/components/Activity/ActivityDisplay/ActivityCardHeader.jsx similarity index 100% rename from mpwo_client/src/components/Activities/ActivityDisplay/ActivityCardHeader.jsx rename to mpwo_client/src/components/Activity/ActivityDisplay/ActivityCardHeader.jsx diff --git a/mpwo_client/src/components/Activities/ActivityDisplay/ActivityCharts.jsx b/mpwo_client/src/components/Activity/ActivityDisplay/ActivityCharts.jsx similarity index 100% rename from mpwo_client/src/components/Activities/ActivityDisplay/ActivityCharts.jsx rename to mpwo_client/src/components/Activity/ActivityDisplay/ActivityCharts.jsx diff --git a/mpwo_client/src/components/Activities/ActivityDisplay/ActivityDetails.jsx b/mpwo_client/src/components/Activity/ActivityDisplay/ActivityDetails.jsx similarity index 100% rename from mpwo_client/src/components/Activities/ActivityDisplay/ActivityDetails.jsx rename to mpwo_client/src/components/Activity/ActivityDisplay/ActivityDetails.jsx diff --git a/mpwo_client/src/components/Activities/ActivityDisplay/ActivityMap.jsx b/mpwo_client/src/components/Activity/ActivityDisplay/ActivityMap.jsx similarity index 100% rename from mpwo_client/src/components/Activities/ActivityDisplay/ActivityMap.jsx rename to mpwo_client/src/components/Activity/ActivityDisplay/ActivityMap.jsx diff --git a/mpwo_client/src/components/Activities/ActivityDisplay/index.jsx b/mpwo_client/src/components/Activity/ActivityDisplay/index.jsx similarity index 100% rename from mpwo_client/src/components/Activities/ActivityDisplay/index.jsx rename to mpwo_client/src/components/Activity/ActivityDisplay/index.jsx diff --git a/mpwo_client/src/components/Activities/ActivityEdit.jsx b/mpwo_client/src/components/Activity/ActivityEdit.jsx similarity index 100% rename from mpwo_client/src/components/Activities/ActivityEdit.jsx rename to mpwo_client/src/components/Activity/ActivityEdit.jsx diff --git a/mpwo_client/src/components/Activities/ActivityForms/FormWithGpx.jsx b/mpwo_client/src/components/Activity/ActivityForms/FormWithGpx.jsx similarity index 100% rename from mpwo_client/src/components/Activities/ActivityForms/FormWithGpx.jsx rename to mpwo_client/src/components/Activity/ActivityForms/FormWithGpx.jsx diff --git a/mpwo_client/src/components/Activities/ActivityForms/FormWithoutGpx.jsx b/mpwo_client/src/components/Activity/ActivityForms/FormWithoutGpx.jsx similarity index 100% rename from mpwo_client/src/components/Activities/ActivityForms/FormWithoutGpx.jsx rename to mpwo_client/src/components/Activity/ActivityForms/FormWithoutGpx.jsx diff --git a/mpwo_client/src/components/Activities/index.jsx b/mpwo_client/src/components/Activity/index.jsx similarity index 100% rename from mpwo_client/src/components/Activities/index.jsx rename to mpwo_client/src/components/Activity/index.jsx diff --git a/mpwo_client/src/components/App.jsx b/mpwo_client/src/components/App.jsx index 3791aad4..6e09dabf 100644 --- a/mpwo_client/src/components/App.jsx +++ b/mpwo_client/src/components/App.jsx @@ -3,7 +3,7 @@ import { Redirect, Route, Switch } from 'react-router-dom' import './App.css' import Admin from './Admin' -import Activity from './Activities/index' +import Activity from './Activity/index' import Dashboard from './Dashboard' import Logout from './User/Logout' import NavBar from './NavBar' diff --git a/mpwo_client/src/components/Dashboard/Statistics.jsx b/mpwo_client/src/components/Dashboard/Statistics.jsx index e07c5960..59e58388 100644 --- a/mpwo_client/src/components/Dashboard/Statistics.jsx +++ b/mpwo_client/src/components/Dashboard/Statistics.jsx @@ -45,7 +45,7 @@ class Statistics extends React.Component {
{Object.keys(statistics).length === 0 ? ( - 'No activities!' + 'No workouts' ) : (
diff --git a/mpwo_client/src/components/Dashboard/UserStatistics.jsx b/mpwo_client/src/components/Dashboard/UserStatistics.jsx index 80a9f87a..a132c0a6 100644 --- a/mpwo_client/src/components/Dashboard/UserStatistics.jsx +++ b/mpwo_client/src/components/Dashboard/UserStatistics.jsx @@ -13,7 +13,7 @@ export default function UserStatistics (props) {
{user.nbActivities}
-
{user.nbActivities === 1 ? 'activity' : 'activities'}
+
{`workout${user.nbActivities !== 1 && 's'}`}
diff --git a/mpwo_client/src/components/NavBar/index.jsx b/mpwo_client/src/components/NavBar/index.jsx index d63b7371..ec1fdd80 100644 --- a/mpwo_client/src/components/NavBar/index.jsx +++ b/mpwo_client/src/components/NavBar/index.jsx @@ -42,7 +42,7 @@ function NavBar(props) { pathname: '/activities/add', }} > - Add a workout + Add workout )}