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

@ -25,7 +25,7 @@ export type gitState = {
repositories: repository[] repositories: repository[]
remoteBranches: remoteBranch[] remoteBranches: remoteBranch[]
commitChanges: commitChange[] commitChanges: commitChange[]
branchCommits: Record<string, ReadCommitResult[]> branchCommits: Record<string, pagedCommits[]>
syncStatus: syncStatus, syncStatus: syncStatus,
localCommitCount: number localCommitCount: number
remoteCommitCount: number remoteCommitCount: number
@ -35,6 +35,14 @@ export type gitState = {
gitHubAccessToken: string gitHubAccessToken: string
} }
export type pagedCommits = {
page: number,
perPage: number,
total: number,
hasNextPage: boolean,
commits: ReadCommitResult[]
}
export type loaderState = { export type loaderState = {
branches: boolean branches: boolean
remotes: boolean remotes: boolean
@ -210,7 +218,7 @@ export interface setBranchCommitsAction {
type: string, type: string,
payload: { payload: {
branch: branch, branch: branch,
commits: ReadCommitResult[] commits: pagedCommits[]
} }
} }

Loading…
Cancel
Save