mirror of
https://git.roussel.pro/telecom-paris/pact.git
synced 2026-02-09 10:30:17 +01:00
Interface admin : graph page d'accueil
This commit is contained in:
46
code/interface_admin/pages/index.js
Normal file
46
code/interface_admin/pages/index.js
Normal file
@@ -0,0 +1,46 @@
|
||||
import Head from 'next/head'
|
||||
import { Inter } from '@next/font/google'
|
||||
import { Card, Container } from 'react-bootstrap'
|
||||
import ComparativeBarChart from '../components/ComparativeBarChart'
|
||||
import { useState } from 'react'
|
||||
|
||||
const inter = Inter({ subsets: ['latin'] })
|
||||
|
||||
export default function Home() {
|
||||
const [datasets, setDatasets] = useState([[1, 2, 3, 4, 5, 6, 7], [7, 6, 5, 4, 3, 2, 1]]);
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Create Next App</title>
|
||||
<meta name="description" content="Page d'accueil" />
|
||||
</Head>
|
||||
<Container fluid>
|
||||
<Card>
|
||||
<Card.Header as="h2">Vos performances de cette semaine</Card.Header>
|
||||
<div className='col col-12 col-lg-8 mx-auto'>
|
||||
<Card.Body className='w-100'>
|
||||
<ComparativeBarChart
|
||||
xlabels={["lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi", "dimanche"]}
|
||||
label0="Cette semaine"
|
||||
label1="La semaine dernière"
|
||||
title="Note moyenne"
|
||||
data0={datasets[0]}
|
||||
data1={datasets[1]}
|
||||
/>
|
||||
<ComparativeBarChart
|
||||
xlabels={["lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi", "dimanche"]}
|
||||
label0="Cette semaine"
|
||||
label1="La semaine dernière"
|
||||
title="Nombre d'avis"
|
||||
data0={datasets[0]}
|
||||
data1={datasets[1]}
|
||||
/>
|
||||
</Card.Body>
|
||||
</div>
|
||||
</Card>
|
||||
</Container>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user