File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
src/containers/SequenceSearch/components/SearchForm Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,34 @@ import {store} from "app.jsx";
66
77
88class SearchForm extends React . Component {
9+ showDatabase ( ) {
10+ const databases = this . props . databases ;
11+ if ( databases . length > 1 ) {
12+ return (
13+ < div >
14+ < h1 > Search an RNA sequence in
15+ {
16+ databases . map ( function ( item , index ) {
17+ return < span key = { `${ index } ` } > { ( index ? ', ' : '' ) + item } </ span > ;
18+ } )
19+ }
20+ </ h1 >
21+ </ div >
22+ )
23+ } else if ( databases . length === 0 ) {
24+ return < h1 > Search an RNA sequence in RNA databases</ h1 >
25+ } else {
26+ return < h1 > Search an RNA sequence in { databases } </ h1 >
27+ }
28+ }
29+
930 render ( ) {
1031 return (
1132 < div className = "row" >
1233 < div className = "col-lg-12" >
1334 < div className = "hpanel" >
1435 < div className = "panel-heading" >
15- < h1 > Search an RNA sequence in RNA databases </ h1 >
36+ { this . showDatabase ( ) }
1637 </ div >
1738 < div className = "panel-body" >
1839 < form onSubmit = { ( e ) => this . onSubmit ( e ) } >
You can’t perform that action at this time.
0 commit comments