Skip to content

Commit

Permalink
Add in text when there are no issues
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmarcia committed Nov 2, 2023
1 parent 322a6a0 commit e6530d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 10 additions & 5 deletions components/IssueList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ type IssueListProps = {

export const IssuesList = ({ issues }: IssueListProps) => {
return (

<ol className="repo-item__issue-list">
{issues.map((issue) => (
<IssueItem issue={issue} key={issue.id} />
))}
{issues.length > 0 ? (
issues.map((issue) => <IssueItem issue={issue} key={issue.id} />)
) : (
<li>
This project does not appear to have any issues marked Help Wanted or Good First Issue. If
this project speaks to you, consider seeing if there are other ways to help contribute!
You can find more information on the project&apos;s GitHub page. It is also possible that they
are not using issue labels or GitHub issues to track their work.
</li>
)}
</ol>

);
};
5 changes: 1 addition & 4 deletions components/RepositoryItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ export const RepositoryItem = ({ repository }: RepositoryItemProps) => {

return (
<div className="repo-item">
<div
id={`repo-${repository.id}`}
onClick={() => setIsIssueOpen(!isIssueOpen)}
>
<div id={`repo-${repository.id}`} onClick={() => setIsIssueOpen(!isIssueOpen)}>
<div>
<RepositoryItemTopBar
isIssueOpen={isIssueOpen}
Expand Down

0 comments on commit e6530d7

Please sign in to comment.