()
| 5 | import "./Sidebar.css"; |
| 6 | |
| 7 | const Sidebar = () => { |
| 8 | const { user } = useSelector(selectUser); |
| 9 | |
| 10 | const recentItem = (topic) => ( |
| 11 | <div className="sidebar__recentItem"> |
| 12 | <span className="sidebar__hash">#</span> |
| 13 | <p>{topic}</p> |
| 14 | </div> |
| 15 | ); |
| 16 | |
| 17 | return ( |
| 18 | <div className="sidebar"> |
| 19 | <div className="sidebar__top"> |
| 20 | <img |
| 21 | src="https://images.unsplash.com/photo-1579546929518-9e396f3cc809?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8&w=1000&q=80" |
| 22 | alt="" |
| 23 | /> |
| 24 | <Avatar src={user.photoUrl} className="sidebar__avatar"> |
| 25 | {user.email[0].toUpperCase()} |
| 26 | </Avatar> |
| 27 | <h2>{user.displayName}</h2> |
| 28 | <h4>{user.email}</h4> |
| 29 | </div> |
| 30 | |
| 31 | <div className="sidebar__stats"> |
| 32 | <div className="sidebar__stat"> |
| 33 | <p>Who viewed you</p> |
| 34 | <p className="sidebar__statNumber">2,300</p> |
| 35 | </div> |
| 36 | <div className="sidebar__stat"> |
| 37 | <p>Views on post</p> |
| 38 | <p className="sidebar__statNumber">2,570</p> |
| 39 | </div> |
| 40 | </div> |
| 41 | |
| 42 | <div className="sidebar__bottom"> |
| 43 | <p>Recent</p> |
| 44 | {recentItem("reactjs")} |
| 45 | {recentItem("programming")} |
| 46 | {recentItem("softwareengineering")} |
| 47 | {recentItem("design")} |
| 48 | {recentItem("developer")} |
| 49 | </div> |
| 50 | </div> |
| 51 | ); |
| 52 | }; |
| 53 | |
| 54 | export default Sidebar; |
nothing calls this directly
no test coverage detected