@@ -726,76 +726,76 @@ export class Search extends Component {
726
726
console . log ( this . state . feed )
727
727
}
728
728
729
- hoverState = ( bool ) => this . setState ( { mouse : bool } )
730
-
731
- select = ( id ) => this . setState ( { select : [ ...this . state . select , id ] } )
732
-
733
- loadMore = ( ) => {
734
- this . setState ( { offset : this . state . offset + 15 } )
735
- this . update ( this . state . select , false )
736
- }
737
-
738
- handleKey = ( e ) => {
739
- console . log ( this . state . search )
740
- if ( e . key == 'Enter' ) this . search ( this . state . search )
741
- }
742
-
743
- render ( ) {
744
-
745
- return (
746
- < Page >
747
- < Container >
748
- < Padding >
749
- < Input
750
- type = "text"
751
- name = "search"
752
- onChange = { this . handleChange }
753
- label = "search objkt id, artists, tags (press Enter)"
754
- placeholder = "search objkt id, artists, tags (press Enter)"
755
- onKeyPress = { this . handleKey }
756
- />
757
- {
758
- < div style = { { marginTop : '15px' } } >
759
- { this . state . tags . map ( e => < a className = 'tag' href = '#' onClick = { ( ) => {
760
- this . update ( e . value , true )
761
- } } > { e . value } </ a > ) }
762
- </ div >
763
- }
764
- {
765
- ( this . state . subjkt . length > 0 ) && ( this . state . search !== "" ) ?
766
- < div style = { { maxHeight : '200px' , overflow : 'scroll' } } >
767
- {
768
- this . state . subjkt . map ( e => < div style = { { marginTop : '10px' } } > < a href = { `/${ e . name } ` } > { e . name } </ a > { e . metadata . description } </ div > )
769
- }
770
- </ div >
771
- :
772
- undefined
773
- }
774
- </ Padding >
775
- </ Container >
776
- < Container xlarge >
729
+ hoverState = ( bool ) => this . setState ( { mouse : bool } )
730
+
731
+ select = ( id ) => this . setState ( { select : [ ...this . state . select , id ] } )
732
+
733
+ loadMore = ( ) => {
734
+ this . setState ( { offset : this . state . offset + 15 } )
735
+ this . update ( this . state . select , false )
736
+ }
737
+
738
+ handleKey = ( e ) => {
739
+ console . log ( this . state . search )
740
+ if ( e . key == 'Enter' ) this . search ( this . state . search )
741
+ }
742
+
743
+ render ( ) {
744
+
745
+ return (
746
+ < Page >
747
+ < Container >
748
+ < Padding >
749
+ < Input
750
+ type = "text"
751
+ name = "search"
752
+ onChange = { this . handleChange }
753
+ label = "search for objkt id, artists, tags ↵"
754
+ placeholder = "search for objkt id, artists, tags ↵"
755
+ onKeyPress = { this . handleKey }
756
+ />
757
+ {
758
+ < div style = { { marginTop : '15px' } } >
759
+ { this . state . tags . map ( e => < a className = 'tag' href = '#' onClick = { ( ) => {
760
+ this . update ( e . value , true )
761
+ } } > { e . value } </ a > ) }
762
+ </ div >
763
+ }
777
764
{
778
- this . state . feed . length > 0 ?
779
- < InfiniteScroll
780
- dataLength = { this . state . feed . length }
781
- next = { this . loadMore }
782
- hasMore = { this . state . hasMore }
783
- loader = { undefined }
784
- endMessage = { undefined }
785
- >
786
- < Container >
787
- < Padding >
788
- { this . state . feed . map ( ( item , index ) => (
789
- < FeedItem key = { `${ item . id } -${ index } ` } { ...item } />
790
- ) ) }
791
- </ Padding >
792
- </ Container >
793
- </ InfiniteScroll >
765
+ ( this . state . subjkt . length > 0 ) && ( this . state . search !== "" ) ?
766
+ < div style = { { maxHeight : '200px' , overflow : 'scroll' } } >
767
+ {
768
+ this . state . subjkt . map ( e => < div style = { { marginTop : '10px' } } > < a href = { `/${ e . name } ` } > { e . name } </ a > { e . metadata . description } </ div > )
769
+ }
770
+ </ div >
794
771
:
795
772
undefined
796
773
}
797
- </ Container >
798
- </ Page >
799
- )
800
- }
774
+ </ Padding >
775
+ </ Container >
776
+ < Container xlarge >
777
+ {
778
+ this . state . feed . length > 0 ?
779
+ < InfiniteScroll
780
+ dataLength = { this . state . feed . length }
781
+ next = { this . loadMore }
782
+ hasMore = { this . state . hasMore }
783
+ loader = { undefined }
784
+ endMessage = { undefined }
785
+ >
786
+ < Container >
787
+ < Padding >
788
+ { this . state . feed . map ( ( item , index ) => (
789
+ < FeedItem key = { `${ item . id } -${ index } ` } { ...item } />
790
+ ) ) }
791
+ </ Padding >
792
+ </ Container >
793
+ </ InfiniteScroll >
794
+ :
795
+ undefined
796
+ }
797
+ </ Container >
798
+ </ Page >
799
+ )
801
800
}
801
+ }
0 commit comments