Skip to content

Commit

Permalink
changing value on Table
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaOlas committed Apr 25, 2024
1 parent fb23d10 commit 001d3b2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 23 deletions.
3 changes: 1 addition & 2 deletions src/components/admin/dashboard-statistics/CountryStats.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React from 'react';

import BarCharts from './charts/BarCharts';
import DashboardTable from './charts/DashboardTable';
import HorizontalBars from './charts/HorizontalCharts';
import PieCharts from './charts/PieCharts';
import DashboardTable from './charts/DashboardTable';

import styles from './styles/charts.module.css';

const pieChartData = {
Expand Down
38 changes: 17 additions & 21 deletions src/components/admin/dashboard-statistics/charts/DashboardTable.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
import * as React from 'react';
import Paper from '@mui/material/Paper';
import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
import TableContainer from '@mui/material/TableContainer';
import TableHead from '@mui/material/TableHead';
import TableRow from '@mui/material/TableRow';

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

View workflow job for this annotation

GitHub Actions / lint

There should be at least one empty line between import groups
import Paper from '@mui/material/Paper';
import React from 'react';

Check failure on line 8 in src/components/admin/dashboard-statistics/charts/DashboardTable.tsx

View workflow job for this annotation

GitHub Actions / lint

`react` import should occur before import of `@mui/material/Paper`

function createData(
name: string,
calories: number,
fat: number,
carbs: number,
protein: number,
) {
return { name, calories, fat, carbs, protein };
function createData(classroom: string, vm: sting, prof: string, status: string) {
return { classroom, vm, prof, status };
}

const rows = [

Check warning on line 14 in src/components/admin/dashboard-statistics/charts/DashboardTable.tsx

View workflow job for this annotation

GitHub Actions / lint

'rows' is assigned a value but never used
Expand All @@ -31,28 +25,30 @@ export default function DashboardTable() {
<Table sx={{ minWidth: 650 }} aria-label="simple table">
<TableHead>
<TableRow>
<TableCell>Dessert (100g serving)</TableCell>
<TableCell align="right">Calories</TableCell>
<TableCell align="right">Fat&nbsp;(g)</TableCell>
<TableCell align="right">Carbs&nbsp;(g)</TableCell>
<TableCell align="right">Protein&nbsp;(g)</TableCell>
<TableCell>A surveiller</TableCell>
</TableRow>
<TableRow>
<TableCell align="right">Classe</TableCell>
<TableCell align="right">Village-Monde</TableCell>
<TableCell align="right">Professeur</TableCell>
<TableCell align="right">Statut</TableCell>
</TableRow>
</TableHead>
<TableBody>
{rows.map((row) => (
{/* {rows.map((row) => (
<TableRow
key={row.name}
sx={{ '&:last-child td, &:last-child th': { border: 0 } }}
>
<TableCell component="th" scope="row">
{row.name}
</TableCell>
<TableCell align="right">{row.calories}</TableCell>
<TableCell align="right">{row.fat}</TableCell>
<TableCell align="right">{row.carbs}</TableCell>
<TableCell align="right">{row.protein}</TableCell>
<TableCell align="right">{row.classroom}</TableCell>
<TableCell align="right">{row.vm}</TableCell>
<TableCell align="right">{row.prof}</TableCell>
<TableCell align="right">{row.status}</TableCell>
</TableRow>
))}
))} */}
</TableBody>
</Table>
</TableContainer>
Expand Down

0 comments on commit 001d3b2

Please sign in to comment.