From 71feab49eba99f67a9855487399757d3864a3339 Mon Sep 17 00:00:00 2001 From: Will Byrne Date: Fri, 1 Nov 2024 15:21:54 +0000 Subject: [PATCH] fix compilation issue with optional evaluationSummary and add story for no summary reviews tab [elifesciences/enhanced-preprints-issues#1184] --- .../pages/article/article-page.stories.tsx | 23 +++++++++++++++++++ .../pages/article/tabs/reviews-tab.tsx | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/components/pages/article/article-page.stories.tsx b/src/components/pages/article/article-page.stories.tsx index b52634288..820b488ff 100644 --- a/src/components/pages/article/article-page.stories.tsx +++ b/src/components/pages/article/article-page.stories.tsx @@ -158,6 +158,29 @@ export const ArticlePageRevisedReviewsTab: Story = { ), }; +export const ArticlePageRevisedReviewsTabNoSummary: Story = { + args: { + metaData, + status, + activeTab: 'reviews', + tabs, + relatedContent, + metrics, + timeline, + }, + render: (args) => { + const { reviews, authorResponse } = peerReview; + + return ( + + + + + + ); + }, +}; + export const ArticlePageErrorTab: Story = { args: { metaData, diff --git a/src/components/pages/article/tabs/reviews-tab.tsx b/src/components/pages/article/tabs/reviews-tab.tsx index 1b163a70a..41cf9d58c 100644 --- a/src/components/pages/article/tabs/reviews-tab.tsx +++ b/src/components/pages/article/tabs/reviews-tab.tsx @@ -20,7 +20,7 @@ export const ArticleReviewsTab = ({ peerReview, currentVersion }: { peerReview:
- + { peerReview.evaluationSummary && } {peerReview.reviews.map((review, index) => ( ))}