Skip to content

Commit

Permalink
Merge pull request #75 from jacobrs/ProfileStyle
Browse files Browse the repository at this point in the history
Added sidebar component
  • Loading branch information
Martin Spasov committed Feb 16, 2017
2 parents 2999914 + d1a1fa6 commit 5c0fcc9
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#sidebar{
background-color: #fff;
color: #555;
text-align: center;
}

#sidebar ul{
list-style-type: none;
background-color: #fff;
width: 100%;
margin: 0;
padding: 0;
}

#sidebar ul li a{
display: block;
color: #a1a1a1;
background-color: #f1f1f1;
padding: 8px 16px;
margin-bottom: 10px;
text-decoration: none;
}

#sidebar ul li a:hover{
background-color: #555;
color: #fff;
}


#circle-image{
border-radius: 50%;
width: 120px;
height: 120px;
margin-top: 30px;
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
import React, { Component, PropTypes } from 'react';

import { Link } from 'react-router';
// Import Style
// import styles from './UserInfoComponent.css';
import styles from './UserInfoComponent.css';

function UserInfoComponent(props) {
if(Object.keys(props.users).length == 1) // wait props.users not to be null
if (Object.keys(props.users).length === 1){ // wait props.users not to be null
return (
<div>
<h2>Welcome {props.users.user.firstName} {props.users.user.lastName}</h2>
<h3>Account created {props.users.user.dateAdded}</h3>
<div className="col-md-3" id={styles.sidebar}>
<img className="img-circle" id={styles['circle-image']}src="https://static.independent.co.uk/s3fs-public/thumbnails/image/2015/06/15/09/jon-snow.jpg" />
<h3>{props.users.user.firstName} {props.users.user.lastName} </h3>
<p>{props.users.user.email} </p>
<ul>
<li><Link>Course 1</Link></li>
<li><Link>Course 2</Link></li>
<li><Link>Course 3</Link></li>
<li><Link>Course 4</Link></li>
<li><Link>Course 5</Link></li>
</ul>
</div>
);
}
return (
<h1>Loading</h1>
)
);
}


export default UserInfoComponent;


0 comments on commit 5c0fcc9

Please sign in to comment.