diff --git a/pages/tournament-statistics.js b/pages/tournament-statistics.js
index 575bdc7..6a1e3d4 100644
--- a/pages/tournament-statistics.js
+++ b/pages/tournament-statistics.js
@@ -16,6 +16,7 @@ import { BigImage } from '../js/components/BigImage';
import { Footer } from '../js/components/Footer';
import { Order, sort } from '../js/utils/sort';
+import '../static/css/tournament-statistics.css';
class TeamRow extends React.Component {
constructor(props) {
@@ -48,6 +49,11 @@ class StatisticsComponent extends React.Component {
constructor(props) {
super(props);
+
+ this.state = {
+ showFullTable: false
+ };
+ this.toggleShowFullTable = this.toggleShowFullTable.bind(this);
}
render() {
@@ -72,15 +78,41 @@ class StatisticsComponent extends React.Component {
Match Differenz |
Punkt Differenz |
- { sortedPerformances.map((team, index) => (
+ { map(sortedPerformances, (team, index) => (
- )) }
+ ), 0, (this.state.showFullTable)? undefined : 3) }
+
+ |
+
+ |
+
);
}
+
+ toggleShowFullTable() {
+ this.setState({ showFullTable: !this.state.showFullTable });
+ }
+}
+
+function map(arr, func, start, end) {
+ return arr.slice(start, end).map(func);
+}
+
+class TableButton extends React.Component {
+
+ render() {
+ const { isFullTableShown } = this.props;
+
+ if(isFullTableShown) {
+ return ;
+ } else {
+ return ;
+ }
+ }
}
class StatisticsTournamentPage extends React.Component {
diff --git a/static/css/tournament-statistics.css b/static/css/tournament-statistics.css
new file mode 100644
index 0000000..cdb0f18
--- /dev/null
+++ b/static/css/tournament-statistics.css
@@ -0,0 +1,4 @@
+
+.table-final-btn {
+ width: 100%;
+}
\ No newline at end of file