From d11e30be21d19d12ecd46791211a611f809cf16a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Wed, 25 May 2022 06:40:00 +0400 Subject: [PATCH] Use KatStats component --- pages/index.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/pages/index.js b/pages/index.js index 79ac37b..adcc3ac 100644 --- a/pages/index.js +++ b/pages/index.js @@ -12,6 +12,7 @@ import Footer from '../components/footer' import RezoDialog from '../components/rezo/rezo-dialog' import {jwennStats} from '../lib/oki-api' +import KatStats from '../components/stats/kat-stats' import KatKayLa from '../components/kat-kay-la' import Custom500 from './500' @@ -22,6 +23,36 @@ export default function Home({errorCode, errorMessage, stats}) { return } + const {parolesWithoutTranslation} = stats + + const statsByLang = [ + { + code: 'fr', + value: parolesWithoutTranslation.francais, + emoji: '🇫🇷' + }, + { + code: 'en', + value: parolesWithoutTranslation.anglais, + emoji: '🇬🇧' + }, + { + code: 'es', + value: parolesWithoutTranslation.espagnol, + emoji: '🇪🇸' + }, + { + code: 'de', + value: parolesWithoutTranslation.allemand, + emoji: '🇩🇪' + }, + { + code: 'it', + value: parolesWithoutTranslation.italien, + emoji: '🇮🇹' + } + ] + return ( @@ -49,6 +80,11 @@ export default function Home({errorCode, errorMessage, stats}) { + + {statsByLang.map(({code, value, emoji}) => ( + + ))} +