Skip to content

Commit ebca701

Browse files
Removed logs and added keys
1 parent ab34657 commit ebca701

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/DisplayTable.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const DisplayTable = ({ tableData, isDarkMode, districtLevel }) => {
6767
(state) => state.statecode === statecode
6868
);
6969
const districtData = stateWithDist.districtData.map((dist) => (
70-
<tr className="district-tr">
70+
<tr className="district-tr" key={dist.district}>
7171
<td className="district-td" style={lightText}>
7272
{dist.district}
7373
</td>
@@ -96,7 +96,7 @@ const DisplayTable = ({ tableData, isDarkMode, districtLevel }) => {
9696
));
9797
const markup = (
9898
<>
99-
<tr className="district-tr">
99+
<tr className="district-tr" key={`${statecode} Dist`}>
100100
<th className="tableHead districtHead">District</th>
101101
<th className="tableHead districtHead">Confirmed</th>
102102
<th className="tableHead districtHead">Active</th>
@@ -192,8 +192,8 @@ const DisplayTable = ({ tableData, isDarkMode, districtLevel }) => {
192192
</thead>
193193
<tbody>
194194
{items.map((item) => (
195-
<>
196-
<tr key={item.statecode} className="state-tr">
195+
<React.Fragment key={item.statecode}>
196+
<tr className="state-tr">
197197
<td className="state-td" style={lightText}>
198198
<FontAwesomeIcon
199199
icon={
@@ -223,7 +223,7 @@ const DisplayTable = ({ tableData, isDarkMode, districtLevel }) => {
223223
{distId === item.statecode && displayDist
224224
? getDistrictData(item.statecode)
225225
: null}
226-
</>
226+
</React.Fragment>
227227
))}
228228
</tbody>
229229
</table>

0 commit comments

Comments
 (0)