Interface admin : graph page d'accueil

This commit is contained in:
2023-02-09 21:52:53 +01:00
parent e1bc67e4a6
commit 97c95f145c
19 changed files with 224 additions and 12 deletions

View File

@@ -0,0 +1,13 @@
import Menu from '../components/Menu'
import '../styles/globals.css'
import 'bootstrap/dist/css/bootstrap.css';
import { Container } from 'react-bootstrap';
export default function App({ Component, pageProps }) {
return <>
<Menu />
<Container fluid="md">
<Component {...pageProps} />
</Container>
</>
}

View File

@@ -0,0 +1,16 @@
import { Html, Head, Main, NextScript } from 'next/document'
export default function Document() {
return (
<Html lang="en">
<Head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
)
}

View File

View File

View 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>
</>
)
}

View File

@@ -0,0 +1,7 @@
import React from 'react'
export default function Stats() {
return (
<div>stats</div>
)
}