diff --git a/common/app/App.jsx b/common/app/App.jsx
index 6ebfa221f0..1c6c547cc3 100644
--- a/common/app/App.jsx
+++ b/common/app/App.jsx
@@ -19,13 +19,19 @@ export default contain(
displayName: 'FreeCodeCamp',
propTypes: {
- children: PropTypes.node
+ children: PropTypes.node,
+ username: PropTypes.string,
+ points: PropTypes.number,
+ picture: PropTypes.string
},
render() {
+ const { username, points, picture } = this.props;
+ const navProps = { username, points, picture };
return (
-
+
{ this.props.children }
diff --git a/common/app/components/Nav/Nav.jsx b/common/app/components/Nav/Nav.jsx
index 25cafbcaf8..d93e8b7b64 100644
--- a/common/app/components/Nav/Nav.jsx
+++ b/common/app/components/Nav/Nav.jsx
@@ -1,6 +1,7 @@
-import React from 'react';
+import React, { PropTypes } from 'react';
import {
Col,
+ CollapsibleNav,
Nav,
Navbar,
NavItem
@@ -45,16 +46,34 @@ export default class extends React.Component {
static displayName = 'Nav'
static propTypes = {
- signedIn: React.PropTypes.bool
+ points: PropTypes.number,
+ picture: PropTypes.string,
+ signedIn: PropTypes.bool,
+ username: PropTypes.string
}
- renderSignin() {
- if (this.props.signedIn) {
+ renderPoints(username, points) {
+ if (!username) {
+ return null;
+ }
+ return (
+
+ [ { points } ]
+
+ );
+ }
+
+ renderSignin(username, picture) {
+ if (username) {
return (
-
- Show Picture
-
+
+
+
+
);
} else {
return (
@@ -69,6 +88,7 @@ export default class extends React.Component {
}
render() {
+ const { username, points, picture } = this.props;
return (
-
+
+
+
);
}