Skip to content

Commit

Permalink
fix(view): re-order detail commit list (by desc)
Browse files Browse the repository at this point in the history
  • Loading branch information
ytaek committed Sep 29, 2023
1 parent b72f397 commit f75a816
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/view/src/components/Detail/Detail.hook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const useToggleHook = (init = false): UseToggleHook => {
};

export const useCommitListHide = (commitNodeListInCluster: CommitNode[]) => {
const list = getSummaryCommitList(commitNodeListInCluster);
const strech = commitNodeListInCluster.slice(0, commitNodeListInCluster.length - 5).reverse();
const list = getSummaryCommitList(commitNodeListInCluster).reverse();
const strech = commitNodeListInCluster.slice(5, commitNodeListInCluster.length).reverse();
const [toggle, handleToggle] = useToggleHook();
const commitNodeList = toggle ? [...list, ...strech] : list;

Expand Down

0 comments on commit f75a816

Please sign in to comment.