Skip to content

Commit

Permalink
fix compilation issue with optional evaluationSummary and add story f…
Browse files Browse the repository at this point in the history
…or no summary reviews tab [elifesciences/enhanced-preprints-issues#1184]
  • Loading branch information
will-byrne committed Nov 1, 2024
1 parent e48ceea commit 71feab4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions src/components/pages/article/article-page.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Check failure on line 172 in src/components/pages/article/article-page.stories.tsx

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 4 spaces but found 2

return (
<DefaultLayout>
<ArticlePage {...args}>
<ArticleReviewsTab peerReview={{ reviews, authorResponse }} currentVersion={2} />

Check failure on line 177 in src/components/pages/article/article-page.stories.tsx

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 10 space characters but found 9
</ArticlePage>
</DefaultLayout>
);
},
};

export const ArticlePageErrorTab: Story = {
args: {
metaData,
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/article/tabs/reviews-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ArticleReviewsTab = ({ peerReview, currentVersion }: { peerReview:
<JumpToMenu headings={headings} />
<div className="article-body-container">
<ReviewProcess current={currentVersion} {...(peerReview.authorResponse ? { authorResponse: true } : {})} />
<EditorsAndReviewers participants={peerReview.evaluationSummary.participants} />
{ peerReview.evaluationSummary && <EditorsAndReviewers participants={peerReview.evaluationSummary.participants} /> }
{peerReview.reviews.map((review, index) => (
<ReviewContent key={index} id={`peer-review-${index}`} content={review.text} doi={review.doi} />
))}
Expand Down

0 comments on commit 71feab4

Please sign in to comment.