diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 656d83c..bd3fb5e 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,10 +2,8 @@
-
-
-
+
@@ -104,7 +102,7 @@
1569429914875
-
+
1569512995385
@@ -176,7 +174,14 @@
1570700448342
-
+
+ 1570702713915
+
+
+
+ 1570702713915
+
+
@@ -206,6 +211,7 @@
-
+
+
\ No newline at end of file
diff --git a/src/components/users/User.js b/src/components/users/User.js
index d388db5..da6f203 100644
--- a/src/components/users/User.js
+++ b/src/components/users/User.js
@@ -1,13 +1,23 @@
-import React, { Component } from "react";
+import React, { Component, Fragment } from "react";
+import Spinner from "../layout/Spinner";
+import PropTypes from "prop-types";
+import { Link } from "react-router-dom";
class User extends Component {
componentDidMount() {
this.props.getUser(this.props.match.params.login);
}
+ static propTypes = {
+ loading: PropTypes.bool,
+ user: PropTypes.object.isRequired,
+ getUser: PropTypes.func.isRequired
+ };
+
render() {
const {
name,
+ company,
avatar_url,
location,
bio,
@@ -22,7 +32,77 @@ class User extends Component {
} = this.props.user;
const { loading } = this.props;
- return
{name}
;
+
+ if (loading) return ;
+
+ return (
+
+ {name}
+
+ Back to search
+
+ Hireable:{" "}
+ {hireable ? (
+
+ ) : (
+
+ )}
+
+
+
+
{name}
+
Location: {location}
+
+
+ {bio && (
+
+ Bio
+ {bio}
+
+ )}
+
+ Visit Github
+
+
+ -
+ {login && (
+
+ Username: {login}
+
+ )}
+
+
+ -
+ {company && (
+
+ Company: {company}
+
+ )}
+
+
+ -
+ {blog && (
+
+ Website: {blog}
+
+ )}
+
+
+
+
+
+
Followers: {followers}
+
Following: {following}
+
Public Repos: {public_repos}
+
Public Gists: {public_gists}
+
+
+ );
}
}