@@ -3,7 +3,6 @@ import { BarChart, ColumnChart, LineChart } from "react-chartkick";
33import "chart.js" ;
44import { colors } from "tailwindcss/defaultTheme" ;
55
6- import { Table } from "../components/table" ;
76import Layout from "../components/layout" ;
87import SEO from "../components/seo" ;
98import lastUpdateAt from "../../data/last_updated_at.json" ;
@@ -102,21 +101,21 @@ const workshopsPerYearChart = [
102101 } ,
103102] ;
104103
105- const attendedPerYearTable : string [ ] [ ] = attendedPerYear
106- . slice ( 0 )
107- . map ( ( item , i ) => {
108- const previousYear = attendedPerYear [ i - 1 ] || { } ;
104+ // const attendedPerYearTable: string[][] = attendedPerYear
105+ // .slice(0)
106+ // .map((item, i) => {
107+ // const previousYear = attendedPerYear[i - 1] || {};
109108
110- const currentYearAttending = item . coaches + item . students ;
111- const previousYearAttending = previousYear . coaches + previousYear . students ;
112- const percentageChange =
113- ( currentYearAttending / previousYearAttending ) * 100 - 100 ;
114- return [
115- item . year ,
116- item . coaches + item . students ,
117- ( percentageChange || 0 ) . toFixed ( 2 ) ,
118- ] . map ( ( item ) => item . toString ( ) ) ;
119- } ) ;
109+ // const currentYearAttending = item.coaches + item.students;
110+ // const previousYearAttending = previousYear.coaches + previousYear.students;
111+ // const percentageChange =
112+ // (currentYearAttending / previousYearAttending) * 100 - 100;
113+ // return [
114+ // item.year,
115+ // item.coaches + item.students,
116+ // (percentageChange || 0).toFixed(2),
117+ // ].map((item) => item.toString());
118+ // });
120119
121120const dataDisplay = [
122121 { property : "coach_count" , title : "Coaches" } ,
@@ -222,11 +221,11 @@ function IndexPage() {
222221 stacked
223222 colors = { [ colors . blue [ "500" ] , colors . pink [ "600" ] ] }
224223 />
225- < h3 > Workshop growth</ h3 >
224+ { /* <h3>Workshop growth</h3>
226225 <Table
227226 headers={["Year", "Attendances", "Growth %"]}
228227 rows={attendedPerYearTable}
229- />
228+ /> */ }
230229 </ div >
231230 < h1 > Members</ h1 >
232231 < h3 > New members per year</ h3 >
0 commit comments