Skip to content

Commit e52f3a3

Browse files
committed
Reported Employees Filtered
1 parent 22b4893 commit e52f3a3

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/components/AppGrid.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,24 @@ const people = [
230230
},
231231
];
232232

233+
const reportedUsers = people.map((data) => data).filter((data) => data.Flag === 'red');
234+
235+
console.log(reportedUsers);
236+
233237
export default function AppGrid() {
234238
return (
235239
<div
236240
style={{ width: "100%", backgroundColor: "white" }}
237241
className="h-[100vh]"
238242
>
239-
<DataGrid
240-
rows={people}
241-
columns={columns}
242-
className="bg-[#394150]"
243-
style={{ color: "white" }}
244-
/>
243+
{reportedUsers !== undefined && (
244+
<DataGrid
245+
rows={reportedUsers}
246+
columns={columns}
247+
className="bg-[#394150]"
248+
style={{ color: "white" }}
249+
/>
250+
)}
245251
</div>
246252
);
247253
}

0 commit comments

Comments
 (0)