From f75a816830e94b1bdae1634698ed8c7cac8e23d1 Mon Sep 17 00:00:00 2001 From: "ytaek.kim" Date: Sat, 30 Sep 2023 00:41:01 +0900 Subject: [PATCH] fix(view): re-order detail commit list (by desc) --- packages/view/src/components/Detail/Detail.hook.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/view/src/components/Detail/Detail.hook.tsx b/packages/view/src/components/Detail/Detail.hook.tsx index 532b87a2..054a07eb 100644 --- a/packages/view/src/components/Detail/Detail.hook.tsx +++ b/packages/view/src/components/Detail/Detail.hook.tsx @@ -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;