diff --git a/src/screens/users/user.css b/src/screens/users/user.css index f9ad850..e69de29 100644 --- a/src/screens/users/user.css +++ b/src/screens/users/user.css @@ -1,40 +0,0 @@ -.user-avatar { - width: 100px; - height: 100px; - border-radius: 6px; -} - -.list-repo { - display: flex; - flex-flow: column; - box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.15); -} - -.list-repo .list-item { - flex-flow: column; - align-items: flex-start; - font-weight: normal; -} - -.list-repo .list-item strong { - margin-bottom: 0.5rem; -} - -.user-details { - display: flex; - align-items: center; -} - -.user-details-meta { - flex: 1; - padding-left: 1.5rem; -} - -.user-details-meta h3 { - margin-bottom: 0.5rem; -} - -.user-details-meta p { - margin-top: 0; - color: #999; -} diff --git a/src/screens/users/user.js b/src/screens/users/user.js index 5bd30c8..db11367 100644 --- a/src/screens/users/user.js +++ b/src/screens/users/user.js @@ -1,10 +1,9 @@ -import React, { Component, Fragment } from 'react' +import React, { Component } from 'react' import request from '../../utils/api' -import './user.css' class User extends Component { state = { - loading: true, + loading: false, user: {}, repos: [] } @@ -22,16 +21,9 @@ class User extends Component { } fetchData = login => { - Promise.all([ - request(`/users/${login}`), - request(`/users/${login}/repos`) - ]).then(([user, repos]) => - this.setState({ - user, - repos, - loading: false - }) - ) + // Fetch the user and the user's repos using the github API. + // The `request` function imported above will help build the base URL and + // Auth header for you. } render() { @@ -42,33 +34,10 @@ class User extends Component { } return ( - -
- user avatar -
-

{user.login}

-

{user.name}

-
-
-

Repos

-
- {repos.map(repo => ( - - {repo.name} - {repo.description} - - ))} -
-
+
+ This is where you will write stuff for {this.props.match.params.login}'s + profle +
) } }