From ffadd03c4935f6771620333f41ea0f20542ad4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BF=E3=81=A6=E3=82=8B=E3=81=9E?= Date: Sat, 14 Mar 2026 03:11:34 +0900 Subject: [PATCH] =?UTF-8?q?PostHistoryPage=20=E3=81=A7=E9=87=8D=E8=A4=87?= =?UTF-8?q?=E3=82=B5=E3=83=A0=E3=83=8D=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=84=E3=83=90=E3=82=B0=EF=BC=88#278?= =?UTF-8?q?=EF=BC=89=20(#293)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #278 Co-authored-by: miteruzo Reviewed-on: https://git.miteruzo.com/miteruzo/btrc-hub/pulls/293 --- 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