Skip to content

Commit

Permalink
adding average stats cards
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaOlas committed May 30, 2024
1 parent 236f759 commit 07366f0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/components/admin/dashboard-statistics/CountryStats.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React from 'react';

import AccessTimeIcon from '@mui/icons-material/AccessTime';
import VisibilityIcon from '@mui/icons-material/Visibility';

import BarCharts from './charts/BarCharts';
import AverageStatsCard from './cards/AverageStatsCard/AverageStatsCard';

Check failure on line 7 in src/components/admin/dashboard-statistics/CountryStats.tsx

View workflow job for this annotation

GitHub Actions / lint

`./cards/AverageStatsCard/AverageStatsCard` import should occur before import of `./charts/BarCharts`
import DashboardTable from './charts/DashboardTable';
import HorizontalChart from './charts/HorizontalChart';
import PieCharts from './charts/PieCharts';
Expand Down Expand Up @@ -50,6 +54,14 @@ const CountryStats = () => {
<StatsCard data={10}>Nombre de classes connectées</StatsCard>
<StatsCard data={10}>Nombre de classes contributrices</StatsCard>
</div>
<div className={styles.averageStatsContainer}>
<AverageStatsCard data={{ min: 1, max: 20, average: 15, median: 5 }} unit="min" icon={<AccessTimeIcon sx={{ fontSize: 'inherit' }} />}>
Temps de connexion moyen par classe
</AverageStatsCard>
<AverageStatsCard data={{ min: 1, max: 20, average: 15, median: 5 }} icon={<VisibilityIcon sx={{ fontSize: 'inherit' }} />}>
Nombre de connexions moyen par classe
</AverageStatsCard>
</div>
<div className={styles.engagementContainer}>
<PieCharts pieChartData={pieChartData} />
<BarCharts barChartData={barChartData} />
Expand Down
12 changes: 10 additions & 2 deletions src/components/admin/dashboard-statistics/styles/charts.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
padding-top: 5%;
}

.averageStatsContainer {
display: flex;
flex-direction: row;
justify-content: space-around;
padding-top: 5%;
gap: 20px;
}

.pieContainer {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -89,9 +97,9 @@
}

.exchangesCard {
min-width: 30%;
width: 70%;
}

.connectionsChart {
max-width: 20%;
width: 30%;
}

0 comments on commit 07366f0

Please sign in to comment.