From 8a304c09d2cbece7d4949ba8bcbf2455396de8a6 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 3 Apr 2024 16:56:22 +0200 Subject: [PATCH] pagecommits --- .../components/panels/branches/branchedetails.tsx | 3 +++ libs/remix-ui/git/src/types/index.ts | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/git/src/components/panels/branches/branchedetails.tsx b/libs/remix-ui/git/src/components/panels/branches/branchedetails.tsx index f9747b0f76..94400b4ed1 100644 --- a/libs/remix-ui/git/src/components/panels/branches/branchedetails.tsx +++ b/libs/remix-ui/git/src/components/panels/branches/branchedetails.tsx @@ -47,6 +47,7 @@ export const BranchDetails = (props: BrancheDetailsProps) => { return ( + <>
{context.branchCommits && Object.entries(context.branchCommits).map(([key, value]) => { if(key == branch.name){ @@ -58,6 +59,8 @@ export const BranchDetails = (props: BrancheDetailsProps) => {
+
Load more
+
) } \ No newline at end of file diff --git a/libs/remix-ui/git/src/types/index.ts b/libs/remix-ui/git/src/types/index.ts index 91c423076a..130c571062 100644 --- a/libs/remix-ui/git/src/types/index.ts +++ b/libs/remix-ui/git/src/types/index.ts @@ -25,7 +25,7 @@ export type gitState = { repositories: repository[] remoteBranches: remoteBranch[] commitChanges: commitChange[] - branchCommits: Record + branchCommits: Record syncStatus: syncStatus, localCommitCount: number remoteCommitCount: number @@ -35,6 +35,14 @@ export type gitState = { gitHubAccessToken: string } +export type pagedCommits = { + page: number, + perPage: number, + total: number, + hasNextPage: boolean, + commits: ReadCommitResult[] +} + export type loaderState = { branches: boolean remotes: boolean @@ -210,7 +218,7 @@ export interface setBranchCommitsAction { type: string, payload: { branch: branch, - commits: ReadCommitResult[] + commits: pagedCommits[] } }