Skip to content

Commit

Permalink
fix: user repo erros
Browse files Browse the repository at this point in the history
  • Loading branch information
amirhnajafiz committed Dec 8, 2022
1 parent 32e3a33 commit 0365da2
Showing 1 changed file with 44 additions and 39 deletions.
83 changes: 44 additions & 39 deletions application/src/components/Box/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,45 +17,50 @@ class Box extends React.Component {

return(
<div className={"response"}>
{
array.map((repo) => (
<div className={"row"}>
<h3>
{repo.full_name}
</h3>
<p className={"row-des"}>
{repo.description}
</p>
<ul className={"list"}>
{
repo.topics.map((topic) => (
<li className={"list-item"}>
{topic}
</li>
))
}
</ul>
<div className={"row-opt"}>
<small>
{repo.language}
</small>
<small>
Stars: {repo.stargazers_count}
</small>
<small>
<a
className={"row-link"}
href={repo.html_url}
target={"_blank"}
rel={"noreferrer"}
>
Repo link
</a>
</small>
</div>
</div>
))
}
{
this.props.userInformation !== "No value" ? (
array.map((repo) => (
<div key={repo.id} className={"row"}>
<h3>
{repo.full_name}
</h3>
<p className={"row-des"}>
{repo.description}
</p>
<ul className={"list"}>
{
repo.topics.map((topic) => (
<li className={"list-item"}>
{topic}
</li>
))
}
</ul>
<div className={"row-opt"}>
<small>
{repo.language}
</small>
<small>
Stars: {repo.stargazers_count}
</small>
<small>
<a
className={"row-link"}
href={repo.html_url}
target={"_blank"}
rel={"noreferrer"}
>
Repo link
</a>
</small>
</div>
</div>
))
) : (
<pre>
No value
</pre>
)}
</div>
)
}
Expand Down

0 comments on commit 0365da2

Please sign in to comment.