MCPcopy Create free account
hub / github.com/codemistic/Web-Development / Sidebar

Function Sidebar

linkedin-clone/src/Sidebar.js:7–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import './Sidebar.css'
6
7const Sidebar = () => {
8
9 const user = useSelector(selectUser)
10
11 const recentItem = (topic) => (
12 <div className='sidebar__recentItem'>
13 <span className='sidebar__hash'>#</span>
14 <p>{topic}</p>
15 </div>
16 )
17
18
19 return (
20 <div className='sidebar'>
21 <div className="sidebar__top">
22 <img src="https://images.pexels.com/photos/7130557/pexels-photo-7130557.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1" alt="" />
23 <Avatar src={user.photoUrl} className='sidebar__avatar'>
24 {user.email[0]}
25 </Avatar>
26 <h2>{user.displayName}</h2>
27 <h4>{user.email}</h4>
28 </div>
29
30 <div className="sidebar__stats">
31 <div className="sidebar__stat">
32 <p>Who viewed you</p>
33 <p className='sidebar__statNumber'>2543</p>
34 </div>
35 <div className="sidebar__stat">
36 <p>Views on post</p>
37 <p className='sidebar__statNumber'>2448</p>
38 </div>
39 </div>
40 <div className="sidebar__bottom">
41 <p>Recent</p>
42 {recentItem('reactjs')}
43 {recentItem('programming')}
44 {recentItem('softwareengineering')}
45 {recentItem('design')}
46 {recentItem('developer')}
47 </div>
48 </div>
49 )
50}
51
52export default Sidebar

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected