Skip to content

Commit 78da7b7

Browse files
committed
updated classNames for module
1 parent 9866a1e commit 78da7b7

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/components/BMDashboard/WeeklyProjectSummary/ExpenditureChart/ExpenditureChart.jsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useEffect, useState } from 'react';
22
import { PieChart, Pie, Cell, Tooltip, Legend } from 'recharts';
33
import axios from 'axios';
4-
import './ExpenditureChart.css';
4+
import styles from './ExpenditureChart.module.css';
55

66
const COLORS = ['#6777EF', '#A0CD61', '#F5CD4B'];
77
const CATEGORIES = ['Labor', 'Equipment', 'Materials'];
@@ -61,8 +61,8 @@ function ExpenditureChart({ projectId }) {
6161
}, [projectId]);
6262

6363
const renderChart = (data, title) => (
64-
<div className="expenditure-chart-card">
65-
<h4 className="expenditure-chart-title">{title}</h4>
64+
<div className={styles.expenditure - chart - card}>
65+
<h4 className={styles.expenditure - chart - title}>{title}</h4>
6666
<PieChart width={280} height={280}>
6767
<Pie
6868
data={data}
@@ -85,11 +85,12 @@ function ExpenditureChart({ projectId }) {
8585
</div>
8686
);
8787

88-
if (loading) return <div className="expenditure-chart-loading">Loading expenditure data...</div>;
89-
if (error) return <div className="expenditure-chart-error">{error}</div>;
88+
if (loading)
89+
return <div className={styles.expenditure - chart - loading}>Loading expenditure data...</div>;
90+
if (error) return <div className={styles.expenditure - chart - error}>{error}</div>;
9091

9192
return (
92-
<div className="expenditure-chart-wrapper">
93+
<div className={styles.expenditure - chart - wrapper}>
9394
{renderChart(normalizeData(actual), 'Actual Expenditure')}
9495
{renderChart(normalizeData(planned), 'Planned Expenditure')}
9596
</div>

0 commit comments

Comments
 (0)