Skip to content

Commit

Permalink
Merge pull request #513 from ProteinsWebTeam/dev
Browse files Browse the repository at this point in the history
Entry summary: move description
  • Loading branch information
matthiasblum authored Sep 12, 2023
2 parents 49caaae + d104c87 commit f48dec0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 36 deletions.
32 changes: 16 additions & 16 deletions src/components/Entry/Summary/__snapshots__/test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ exports[`<SummaryEntry /> should render 1`] = `
}
}
/>
<section>
<React.Fragment>
<h4>
Description
</h4>
<Description
accession="IPR000001"
literature={[]}
textBlocks={
[
"<p>Kringle</p>",
]
}
/>
</React.Fragment>
</section>
</div>
<div
className="vf-stack"
Expand Down Expand Up @@ -99,22 +115,6 @@ exports[`<SummaryEntry /> should render 1`] = `
/>
</div>
</section>
<section>
<React.Fragment>
<h4>
Description
</h4>
<Description
accession="IPR000001"
literature={[]}
textBlocks={
[
"<p>Kringle</p>",
]
}
/>
</React.Fragment>
</section>
<OtherSections
citations={
{
Expand Down
40 changes: 20 additions & 20 deletions src/components/Entry/Summary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,31 +108,31 @@ const SummaryEntry = ({
) : (
<MemberDBSubtitle metadata={metadata} dbInfo={dbInfo} />
)}
<section>
{
// doesn't work for some HAMAP as they have enpty <P> tag
(metadata.description || []).length ? (
<>
<h4>Description</h4>
<Description
textBlocks={metadata.description}
literature={included as Array<[string, Reference]>}
accession={metadata.accession}
/>
</>
) : (
<DescriptionFromIntegrated
integrated={metadata.integrated}
setIntegratedCitations={setIntegratedCitations}
/>
)
}
</section>
</div>
<div className={css('vf-stack')}>
<SidePanel metadata={metadata} dbInfo={dbInfo} />
</div>
</section>
<section>
{
// doesn't work for some HAMAP as they have enpty <P> tag
(metadata.description || []).length ? (
<>
<h4>Description</h4>
<Description
textBlocks={metadata.description}
literature={included as Array<[string, Reference]>}
accession={metadata.accession}
/>
</>
) : (
<DescriptionFromIntegrated
integrated={metadata.integrated}
setIntegratedCitations={setIntegratedCitations}
/>
)
}
</section>
<OtherSections
metadata={metadata}
citations={
Expand Down

0 comments on commit f48dec0

Please sign in to comment.