Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions src/components/Home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@ import RepoCard from '../../styled-components/RepoCard'
import PrinmaryButton from '../../styled-components/Buttons/primary'

function Home() {
const [repos,setRepos] = useState([])
const [repos, setRepos] = useState([])

useEffect(() => {
if(Repos.repos){
setRepos(Repos.repos)
if (Repos.repos) {
setRepos(Repos.repos)
}
}, [])

return (
<div>
Contribute now on any one of these and get your profile listed in the contributors section
<span style={{float:'right'}}>
<PrinmaryButton link={'https://reactjs.org/'} text={"Learn more about React here"} external={false}/>
<span style={{
display: "flex",
justifyContent: "flex-end",
marginTop: "1rem"
}}>
<PrinmaryButton link={'https://reactjs.org/'} text={"Learn more about React here"} external={false} />
</span>

<div className="cards text-center">
{
repos.map((repo)=>{
repos.map((repo) => {
return <RepoCard key={repo.id} title={repo.title} body={repo.body} btnLink={repo.redirectTo} btnText={"Contribute"} />
})
}
Expand Down
10 changes: 5 additions & 5 deletions src/styled-components/Buttons/primary/index.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.primary__button {
/* background: var(--secondary-color); */
background: #002B5B;
background: #002b5b;
font-weight: 600;
border: 1px solid var(--secondary-color);
padding: 0.30rem 0.3rem;
padding: 0.5rem 0.5rem;
border-radius: 4px;
}

.primary__button a {
color: var(--white-color);
font-size: 1.2rem;
margin: 10%;
padding: 0.5rem 1rem;
}

.primary__button:hover {
Expand All @@ -21,5 +21,5 @@

.primary__button:hover a {
/* color: var(--black-color); */
color: #8FE3CF;
}
color: #8fe3cf;
}
9 changes: 4 additions & 5 deletions src/styled-components/RepoCard/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,25 @@

.card__body {
color: var(--white-light-color);
margin-bottom: 0.6rem;
margin-bottom: 1rem;
}

.repo__card__link {
color: var(--white-color)
color: var(--white-color);
}

.card__body__light {
color: var(--black-color);
margin-bottom: 0.6rem;

}

.repo__card__link_light {
color: var(--black-color)
color: var(--black-color);
}

.card__container__light {
padding: 1rem;
/* box-shadow: 1px 2px 7px 0.5px var(--black-color); */
box-shadow: 1px 2px 7px 0.5px #355764;
margin-bottom: 1rem;
}
}