|
@@ -1,4 +1,4 @@
|
|
-function calculateRating (ratings) {
|
|
|
|
|
|
+function calculateRating(ratings) {
|
|
const numberOfRatings = ratings.length
|
|
const numberOfRatings = ratings.length
|
|
const sumOfRatings = ratings.reduce(
|
|
const sumOfRatings = ratings.reduce(
|
|
(accumulator, rating) => accumulator + rating.value,
|
|
(accumulator, rating) => accumulator + rating.value,
|
|
@@ -82,7 +82,6 @@ const Training = props => (
|
|
article {
|
|
article {
|
|
display: grid;
|
|
display: grid;
|
|
grid-template-columns: 1fr 3fr;
|
|
grid-template-columns: 1fr 3fr;
|
|
- padding: 5px 20px;
|
|
|
|
background-color: rgba(127, 127, 127, 0.5);
|
|
background-color: rgba(127, 127, 127, 0.5);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -92,9 +91,12 @@ const Training = props => (
|
|
}
|
|
}
|
|
|
|
|
|
aside {
|
|
aside {
|
|
|
|
+ padding: 1em 2em;
|
|
|
|
+ background: rgba(0,127,0,0.5);
|
|
}
|
|
}
|
|
|
|
|
|
section {
|
|
section {
|
|
|
|
+ padding: 1em 2em;
|
|
background: rgba(127, 0, 0, 0.5);
|
|
background: rgba(127, 0, 0, 0.5);
|
|
}
|
|
}
|
|
`}
|
|
`}
|
|
@@ -215,7 +217,7 @@ const Exercise = props => {
|
|
)
|
|
)
|
|
}
|
|
}
|
|
class TrainingCreateForm extends React.Component {
|
|
class TrainingCreateForm extends React.Component {
|
|
- render () {
|
|
|
|
|
|
+ render() {
|
|
return (
|
|
return (
|
|
<form>
|
|
<form>
|
|
<label htmlFor='title'>
|
|
<label htmlFor='title'>
|