Skip to content

Commit

Permalink
fix(web): the dashboard attestation results should belong to the repo…
Browse files Browse the repository at this point in the history
… they are associated with

fixes #18
  • Loading branch information
kriscoleman committed Jun 13, 2023
1 parent c444d6a commit d337140
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/src/components/repo-list/RepoList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ const RepoList = () => {
const repos = filteredRepos.map((repo) => {
// Filter archivista results by the current repo's project URL
const archivistaResultsByRepo = archivista.results.filter((result) =>
result?.statement?.subjects?.edges?.some((edge) => edge?.node?.name?.includes(repo?.projecturl))
result?.statement?.subjects?.edges?.some((edge) => edge?.node?.name.endsWith(repo?.projecturl))
);

// only show repos with data
if (archivistaResultsByRepo.length > 0)
if (archivistaResultsByRepo.length > 1) {
return (
<Card sx={{ minWidth: 275, margin: '8px' }} key={repo?.id}>
<CardContent>
Expand All @@ -68,7 +68,7 @@ const RepoList = () => {
</CardContent>
</Card>
);
else return null;
} else return null;
});

const results = (
Expand Down

0 comments on commit d337140

Please sign in to comment.