Skip to content

Commit

Permalink
Use repo scoped apps fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
motoki317 committed Dec 4, 2023
1 parent 48fdc39 commit 17db285
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dashboard/src/pages/repos/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export default () => {
)
const [apps] = createResource(
() => params.id,
async () => {
const allAppsRes = await client.getApplications({ scope: GetApplicationsRequest_Scope.ALL })
return repo() ? allAppsRes.applications.filter((app) => app.repositoryId === repo()?.id) : []
},
(id) =>
client
.getApplications({ scope: GetApplicationsRequest_Scope.REPOSITORY, repositoryId: id })
.then((r) => r.applications),
)

const { Modal: DeleteRepoModal, open: openDeleteRepoModal, close: closeDeleteRepoModal } = useModal()
Expand Down

0 comments on commit 17db285

Please sign in to comment.