diff --git a/pages/index.js b/pages/index.js
index acba354..30ecedb 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -1,16 +1,17 @@
import PropTypes from 'prop-types'
-import {Container, Typography, Box, Divider, Chip} from '@mui/material'
+import {Container, Typography, Box, Divider, Chip, Grid} from '@mui/material'
import ArrowCircleDownIcon from '@mui/icons-material/ArrowCircleDown'
import HeadLayout from '../components/head-layout'
import Footer from '../components/footer'
import RezoDialog from '../components/rezo/rezo-dialog'
-import DenyeTeks from '../components/teks/denye-teks'
-import {jwennDenyeTeks} from '../lib/oki-api'
+import {jwennStats} from '../lib/oki-api'
+
+import KatKayLa from '../components/kat-kay-la'
import Custom500 from './500'
-export default function Home({errorCode, errorMessage, teks}) {
+export default function Home({errorCode, errorMessage, stats}) {
if (errorCode) {
console.log('⚠️ error', errorMessage)
return
@@ -19,7 +20,7 @@ export default function Home({errorCode, errorMessage, teks}) {
return (
-
+
#OKi
@@ -36,10 +37,13 @@ export default function Home({errorCode, errorMessage, teks}) {
-
- } label='Derniers textes publiés ' variant='outlined' />
+
+ } label='Statistiques' variant='outlined' />
-
+
+
+
+
@@ -48,12 +52,12 @@ export default function Home({errorCode, errorMessage, teks}) {
}
export async function getServerSideProps() {
- let denyeTeks
+ let stats
let errorCode
let errorMessage
try {
- denyeTeks = await jwennDenyeTeks()
+ stats = await jwennStats()
} catch (error) {
errorMessage = error.message
errorCode = true
@@ -63,7 +67,7 @@ export async function getServerSideProps() {
props: {
errorCode: errorCode || null,
errorMessage: errorMessage || null,
- teks: denyeTeks || null
+ stats: stats || null
}
}
}
@@ -71,11 +75,11 @@ export async function getServerSideProps() {
Home.defaultProps = {
errorCode: null,
errorMessage: null,
- teks: null
+ stats: null
}
Home.propTypes = {
errorCode: PropTypes.bool,
errorMessage: PropTypes.string,
- teks: PropTypes.array
+ stats: PropTypes.object
}