-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b07d14c
commit e703ec0
Showing
34 changed files
with
53,173 additions
and
15,252 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from "react"; | ||
import App from "./App"; | ||
import { ResetCSS } from "./global/resetCSS"; | ||
import GithubProvider from "./providers/github-provider"; | ||
|
||
const Providers = () => { | ||
return ( | ||
<main> | ||
<GithubProvider> | ||
<ResetCSS /> | ||
<App /> | ||
</GithubProvider> | ||
</main> | ||
); | ||
}; | ||
|
||
export default Providers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React, { useState, useEffect } from "react"; | ||
import * as S from "./styled"; | ||
import useGithub from "../../hooks/github-hooks"; | ||
|
||
const Header = () => { | ||
const { getUser } = useGithub(); | ||
useEffect (()=>{ | ||
return getUser("luizrosalba"); | ||
}, []) | ||
return ( | ||
<header> | ||
</header> | ||
); | ||
}; | ||
|
||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Wrapper = styled.div` | ||
display: flex; | ||
width: 100%; | ||
justify-content: space-between; | ||
padding: 4px; | ||
input { | ||
border: 1px solid #ccc; | ||
border-radius: 8px; | ||
width: 100%; | ||
height: 44px; | ||
padding: 8px; | ||
font-weight: 500; | ||
} | ||
button { | ||
background-color: #225ed8; | ||
padding: 8px 16px; | ||
margin: 0 16px; | ||
border-radius: 8px; | ||
&:hover { | ||
background-color: #2c5282; | ||
box-shadow: 3px 2px 10px rgba(0, 0, 0, 0.2); | ||
} | ||
span { | ||
font-weight: bold; | ||
color: #ffff; | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from "react"; | ||
import Header from "../header"; | ||
import * as S from "./styled"; | ||
|
||
const Layout = ({ children }) => { | ||
return ( | ||
<S.WrapperLayout> | ||
<Header /> | ||
{children} | ||
</S.WrapperLayout> | ||
); | ||
}; | ||
|
||
export default Layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import styled from "styled-components"; | ||
|
||
export const WrapperLayout = styled.section` | ||
margin: 16px; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from "react"; | ||
import * as S from "./styled"; | ||
|
||
const NoSearch = () => { | ||
return ( | ||
<S.Wrapper> | ||
<h1>Preencha o nome do usuário (username) do Github</h1> | ||
</S.Wrapper> | ||
); | ||
}; | ||
|
||
export default NoSearch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Wrapper = styled.div` | ||
margin: 16px; | ||
display: flex; | ||
justify-content: center; | ||
h1 { | ||
font-weight: bold; | ||
font-size: 32px; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from "react"; | ||
import * as S from "./styled"; | ||
|
||
const NotFound = () => { | ||
return ( | ||
<> | ||
<S.Wrapper> | ||
<h1>Ops...</h1> | ||
</S.Wrapper> | ||
<S.Wrapper> | ||
<h2>O usuário não foi encontrado !</h2> | ||
</S.Wrapper> | ||
<S.Wrapper> | ||
<h3>Ou você excedeu o limite de consultas ao Github em 1 hora. Tente mais tarde</h3> | ||
</S.Wrapper> | ||
</> | ||
); | ||
}; | ||
|
||
export default NotFound; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Wrapper = styled.div` | ||
margin: 16px; | ||
display: flex; | ||
justify-content: center; | ||
h1 { | ||
font-weight: bold; | ||
font-size: 32px; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import React from "react"; | ||
import useGithub from "../../hooks/github-hooks"; | ||
import * as S from "./styled"; | ||
|
||
const Profile = () => { | ||
const { githubState } = useGithub(); | ||
|
||
return ( | ||
<S.Wrapper> | ||
<S.WrapperImage src={githubState.user.avatar} alt="Avatar of user" /> | ||
<S.WrapperInfoUser> | ||
<div> | ||
<h1>{githubState.user.name}</h1> | ||
<S.WrapperUserGeneric> | ||
<h3>Username:</h3> | ||
<a | ||
href={githubState.user.html_url} | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
{githubState.user.login} | ||
</a> | ||
</S.WrapperUserGeneric> | ||
{/* <S.WrapperUserGeneric> | ||
<h3>Company:</h3> | ||
<span>{githubState.user.company}</span> | ||
</S.WrapperUserGeneric> */} | ||
<S.WrapperUserGeneric> | ||
<h3>Link para o Repositório:</h3> | ||
<a href={"https://github.com/luizrosalba?tab=repositories"} target="_blank" rel="noreferrer"> | ||
Repositório do Github | ||
</a> | ||
</S.WrapperUserGeneric> | ||
</div> | ||
<S.WrapperStatusCount> | ||
<div> | ||
<h4>Seguidores</h4> | ||
<span> {githubState.user.followers}</span> | ||
</div> | ||
<div> | ||
<h4>{githubState.user.name} segue: </h4> | ||
{ | ||
githubState.user.following<=1? | ||
<span> {githubState.user.following} perfil</span> | ||
: | ||
<span> {githubState.user.following} perfis</span> | ||
} | ||
|
||
</div> | ||
<div> | ||
<h4>Gists</h4> | ||
<span> {githubState.user.public_gists}</span> | ||
</div> | ||
<div> | ||
<h4>Repositórios Públicos</h4> | ||
<span> {githubState.user.public_repos}</span> | ||
</div> | ||
</S.WrapperStatusCount> | ||
</S.WrapperInfoUser> | ||
</S.Wrapper> | ||
); | ||
}; | ||
|
||
export default Profile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Wrapper = styled.div` | ||
display: flex; | ||
align-items: flex-start; | ||
`; | ||
|
||
export const WrapperInfoUser = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
justify-content: space-between; | ||
margin-left: 8px; | ||
height: 200px; | ||
h1 { | ||
font-size: 32px; | ||
font-weight: bold; | ||
} | ||
h3 { | ||
font-size: 18px; | ||
font-weight: bold; | ||
} | ||
h4 { | ||
font-size: 16px; | ||
font-weight: bold; | ||
} | ||
`; | ||
|
||
export const WrapperStatusCount = styled.div` | ||
display: flex; | ||
align-items: center; | ||
div { | ||
margin: 8px; | ||
text-align: center; | ||
} | ||
`; | ||
|
||
export const WrapperUserGeneric = styled.div` | ||
display: flex; | ||
align-items: center; | ||
margin-top: 8px; | ||
h3 { | ||
margin-right: 8px; | ||
} | ||
a { | ||
font-size: 20px; | ||
color: white; | ||
font-weight: bold; | ||
} | ||
`; | ||
|
||
export const WrapperImage = styled.img` | ||
border-radius: 50%; | ||
width: 200px; | ||
margin: 8px; | ||
`; |
Oops, something went wrong.