-
Notifications
You must be signed in to change notification settings - Fork 1
/
HomePage.js
44 lines (41 loc) · 1.42 KB
/
HomePage.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import React, { useContext } from "react";
import { StateContext } from "../contextAPI/StateProvider";
import { userList } from "../utils";
import DefaultAvatar from "../assets/default-user.png";
function HomePage() {
const [{ user }, dispatch] = useContext(StateContext);
return (
<>
<div className="dashboard" id="dashboard">
<div className="homepage" id="homepage">
<div className="team-profiles">
<div className="inner">
<div className="container">
<div className="row">
{userList?.map((user, i) => {
return (
<div className="col-xs-12 col-sm-4 col-md-3" key={i}>
<div className="profile-card">
<img
className="profile-image"
src={user.image}
onError={(e) => {
e.target.src = DefaultAvatar;
}}
/>
<p className="profile-name">{user.name}</p>
<div className="profile-email">{user.email}</div>
</div>
</div>
);
})}
</div>
</div>
</div>
</div>
</div>
</div>
</>
);
}
export default HomePage;