Skip to content

Commit

Permalink
Merge pull request #752 from SynBioHub/attachmentadjust
Browse files Browse the repository at this point in the history
made some adjustments to attachment json page for sbol 3
  • Loading branch information
danielfang97 authored Sep 9, 2024
2 parents 3a7df60 + 9a51e8f commit 5404d88
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export default function SectionRenderer({ section, metadata }) {
}
})
}
console.log(section.text);
if (/SO:\s*(\d{7})/.test(section.text)) {
for (let key in sequenceOntology) {
if (section.text === key) {
Expand Down Expand Up @@ -145,7 +144,7 @@ export default function SectionRenderer({ section, metadata }) {
}
return (
<td>
{section.id === "Sequence" && section.link == null ? (
{section.id === "Sequence" && !section.link ? (
section.text.map((line, index) => (
<div
key={index}
Expand All @@ -155,7 +154,7 @@ export default function SectionRenderer({ section, metadata }) {
{line}
</div>
))
) : section.link ? (
) : typeof section.link === 'string' ? (
<ColumnLink
link={section.link}
text={section.text}
Expand All @@ -169,6 +168,7 @@ export default function SectionRenderer({ section, metadata }) {
</td>
);


} else {
return <td>
Loading...
Expand Down
15 changes: 13 additions & 2 deletions frontend/components/Viewing/PageJSON/Types/Attachment3.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
"title": "Extra Work",
"stripAfter": "#",
"predicates": [],
"link": "$<This>"
"link": "$<sourceLink>"
},
{
"title": "sourceLink",
"predicates": [],
"hide": true
}
]
},
Expand All @@ -33,7 +38,13 @@
{
"title": "Extra Work",
"stripAfter": "#",
"predicates": []
"predicates": [],
"link": "$<formatLink>"
},
{
"title": "formatLink",
"predicates": [],
"hide": true
}
]
},
Expand Down

0 comments on commit 5404d88

Please sign in to comment.