diff --git a/src/App.css b/src/App.css index c278b97..b652c5f 100644 --- a/src/App.css +++ b/src/App.css @@ -1,10 +1,11 @@ .App { text-align: center; display: flex; - justify-content: center; + justify-content: space-between; align-items: center; - width: 100vw; - height: 100vh; + width: calc(100vw-3em); + height: calc(100vh-3em); + padding: 3em; } .App-logo { @@ -37,13 +38,29 @@ } } +.searchForm { + display: flex; + flex-direction: column; + justify-content: center; + padding: 10px; +} .avatar { + height: 15em; +} + +.avatarContainer { display: flex; flex-direction: column; height: 60vh; + width: 10vw; + align-items: center; } +.flower { + width: 3em; + height: 3em; +} .left { height: 5em; width: 5em; diff --git a/src/App.js b/src/App.js index 56a36e2..4de4df6 100644 --- a/src/App.js +++ b/src/App.js @@ -17,10 +17,6 @@ function App() { return (
- - + + { !userData1 ? + : + } - - + { !userData2 ? + : + } + { const { avatar_url, login } = userData; return ( -
+
{/* */} Flower Friend
- { position === 'left' ? : } + { position === 'left' ? : } {/* { position === 'left' ? : } */}

{login}

diff --git a/src/components/FlowerPile.js b/src/components/FlowerPile.js index 7f63a6e..f2e1c21 100644 --- a/src/components/FlowerPile.js +++ b/src/components/FlowerPile.js @@ -19,8 +19,8 @@ const FlowerPile = ({ flowerCount, setFlowerCount, position, time}) => { }, [time, position, setFlowerCount]); return (
- {position === 'left' ? : } -

Flower count: { + {position === 'left' ? : } +

FLOWER COUNT: { flowerCount }

diff --git a/src/components/SearchBar.js b/src/components/SearchBar.js index 03aa1b8..1bfd97d 100644 --- a/src/components/SearchBar.js +++ b/src/components/SearchBar.js @@ -14,8 +14,8 @@ const SearchBar = ({position, setUserData}) => { } return ( -
- + + { return (
-

Time: {time}

+

TIME: {time}

); diff --git a/src/utils/getUser.js b/src/utils/getUser.js index d7e0d59..9fcfc91 100644 --- a/src/utils/getUser.js +++ b/src/utils/getUser.js @@ -1,4 +1,4 @@ -// import { token } from '../token'; +import { token } from '../token'; const checkResponse = response => { if (response.status !== 200) { @@ -10,7 +10,7 @@ const checkResponse = response => { export const getUserData = username => { let url = `https://api.github.com/users/${username}`; - // if (token) url = url.concat(`?access_token=${token}`); + if (token) url = url.concat(`?access_token=${token}`); console.log(url); return fetch(url) .then(checkResponse)