diff --git a/parts/1/notes.md b/parts/1/notes.md index 9767352..dfe47dc 100644 --- a/parts/1/notes.md +++ b/parts/1/notes.md @@ -12,7 +12,7 @@ Exercises: * [X] 1.8 * [X] 1.9 * [X] 1.10 -* [ ] 1.11 +* [X] 1.11 * [ ] 1.12 * [ ] 1.13 * [ ] 1.14 diff --git a/parts/1/uniCafe/src/App.jsx b/parts/1/uniCafe/src/App.jsx index 7155b64..6d84222 100644 --- a/parts/1/uniCafe/src/App.jsx +++ b/parts/1/uniCafe/src/App.jsx @@ -8,16 +8,50 @@ const Button = (props) => { return ; }; -const StatisticDisplay = (props) => { +const StatisticsTable = (props) => { + if (props.isThereAnyFeedback) { + return ( + <> +
No feedback given.
+ > + ); + } +} + +const StatisticTableRowDisplay = (props) => { return ( -- {props.statisticName} {props.statisticValue} -
+No feedback given.
- > - ); + const feedbackStatisticsSnapshot = { + good: good, + neutral: neutral, + bad: bad, + totalCount: computeTotalCount(), + average: computeAverage(), + percentagePositive: computePercentagePositive(), + isThereAnyFeedback: isThereAnyFeedback() } return ( @@ -87,7 +102,8 @@ const App = () => { buttonText="bad" />