From b29e5c73294fa4cc089347614abbe8c20eda09fb Mon Sep 17 00:00:00 2001 From: miteruzo Date: Sat, 14 Mar 2026 03:03:16 +0900 Subject: [PATCH] #278 --- frontend/src/pages/posts/PostHistoryPage.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/posts/PostHistoryPage.tsx b/frontend/src/pages/posts/PostHistoryPage.tsx index ab54ad2..a9a5ea9 100644 --- a/frontend/src/pages/posts/PostHistoryPage.tsx +++ b/frontend/src/pages/posts/PostHistoryPage.tsx @@ -37,6 +37,8 @@ export default (() => { document.querySelector ('table')?.scrollIntoView ({ behavior: 'smooth' }) }, [location.search]) + const layoutIds: string[] = [] + return ( @@ -60,7 +62,7 @@ export default (() => { {changes.map ((change, i) => { - let withPost = i === 0 || change.post.id !== changes[i - 1].post.id + const withPost = i === 0 || change.post.id !== changes[i - 1].post.id if (withPost) { rowsCnt = 1 @@ -70,6 +72,13 @@ export default (() => { ++j) ++rowsCnt } + + let layoutId: string | undefined = `page-${ change.post.id }` + if (layoutIds.includes (layoutId)) + layoutId = undefined + else + layoutIds.push (layoutId) + return ( { rowSpan={rowsCnt}> - {change.post.title