pagecommits

git4refactor
filip mertens 8 months ago
parent 88c13ff961
commit 8a304c09d2
  1. 3
      libs/remix-ui/git/src/components/panels/branches/branchedetails.tsx
  2. 12
      libs/remix-ui/git/src/types/index.ts

@ -47,6 +47,7 @@ export const BranchDetails = (props: BrancheDetailsProps) => {
return (<Accordion activeKey={activePanel} defaultActiveKey="">
<BrancheDetailsNavigation checkout={checkout} branch={branch} eventKey="0" activePanel={activePanel} callback={setActivePanel} />
<Accordion.Collapse className="pl-2 border-left ml-1" eventKey="0">
<>
<div className="ml-1">
{context.branchCommits && Object.entries(context.branchCommits).map(([key, value]) => {
if(key == branch.name){
@ -58,6 +59,8 @@ export const BranchDetails = (props: BrancheDetailsProps) => {
</div>
<div>Load more</div>
</>
</Accordion.Collapse>
</Accordion>)
}

@ -25,7 +25,7 @@ export type gitState = {
repositories: repository[]
remoteBranches: remoteBranch[]
commitChanges: commitChange[]
branchCommits: Record<string, ReadCommitResult[]>
branchCommits: Record<string, pagedCommits[]>
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[]
}
}

Loading…
Cancel
Save