Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ikhoon committed Aug 28, 2024
1 parent bee440c commit ff5275a
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ const HistoryListPage = () => {
const pageCount = headPageCount + fromPageCount;
const pageIndex = headPageCount;
const pagination = { pageIndex, pageSize };
const setPagination: (updater: (old: PaginationState) => PaginationState) => void = (
updater: (old: PaginationState) => PaginationState,
) => {
function setPagination(updater: (old: PaginationState) => PaginationState): void {
if (headRevision <= 0) {
return;
}
Expand All @@ -78,7 +76,7 @@ const HistoryListPage = () => {
});
return;
}
};
}

const historyFrom = Math.min(fromRevision, headRevision);
const historyTo = Math.max(baseRevision, 1);
Expand All @@ -91,8 +89,8 @@ const HistoryListPage = () => {
projectName,
repoName,
filePath: targetPath,
revision: Math.min(fromRevision, headRevision),
to: Math.max(baseRevision, 1),
revision: historyFrom,
to: historyTo,
maxCommits: historyFrom - historyTo + 1,
},
{
Expand Down

0 comments on commit ff5275a

Please sign in to comment.