import PlantList from './plantList';
import PlantListAddBox from './plantListAddBox';
import PlantView from './plantView';
import React from 'react';

export default class PlantsViewPage extends React.Component {
    static get propTypes() {
        return {
            editing: React.PropTypes.bool.isRequired,
            filter: React.PropTypes.func.isRequired,
            onAddPlant: React.PropTypes.func.isRequired,
            onEdit: React.PropTypes.func.isRequired,
            plants: React.PropTypes.object.isRequired,
            selectedPlantName: React.PropTypes.string,
            sort: React.PropTypes.func.isRequired
        };
    }
    
    render() {
        let plantView;
        if (this.props.selectedPlantName) {
            plantView = (
                <PlantView
                    plantName={this.props.selectedPlantName}
                    editing={this.props.editing}
                    onEdit={this.props.onEdit} />
            );
        }
        
        return (
            <div id="content" className="plantsViewPage">
                <PlantListAddBox
                    onAdd={this.props.onAddPlant} />
                <PlantList
                    plants={this.props.plants}
                    filterString={this.props.filterString}
                    sortType={this.props.sortType} />
                {plantView}
            </div>
        );
    }
}
@@ -148,534 +148,42 @@
 ';%0A%0A
-export default class PlantsViewPage extends React.Component %7B%0A    static get propTypes() %7B%0A        return %7B%0A            editing: React.PropTypes.bool.isRequired,%0A            filter: React.PropTypes.func.isRequired,%0A            onAddPlant: React.PropTypes.func.isRequired,%0A            onEdit: React.PropTypes.func.isRequired,%0A            plants: React.PropTypes.object.isRequired,%0A            selectedPlantName: React.PropTypes.string,%0A            sort: React.PropTypes.func.isRequired%0A        %7D;%0A    %7D%0A    %0A    render()
+const plantsViewPage = props =%3E
  %7B%0A
-    
     
@@ -201,20 +201,16 @@
 ew;%0A
-    
     if (
 this
@@ -205,21 +205,16 @@
     if (
-this.
 props.se
@@ -236,28 +236,24 @@
 ) %7B%0A        
-   
- 
 plantView = 
@@ -262,28 +262,24 @@
             
-    
 %3CPlantView%0A 
@@ -289,28 +289,24 @@
             
-   
- 
 plantName=%7Bt
@@ -304,21 +304,16 @@
 ntName=%7B
-this.
 props.se
@@ -345,20 +345,16 @@
         
-  
-  
 editing=
@@ -350,29 +350,24 @@
    editing=%7B
-this.
 props.editin
@@ -389,20 +389,16 @@
     
- 
-   
 onEdit=%7B
 this
@@ -393,21 +393,16 @@
 onEdit=%7B
-this.
 props.on
@@ -418,27 +418,19 @@
         
-    );%0A    
+);%0A
     %7D%0A  
@@ -435,21 +435,13 @@
     
-    %0A   
+%0A
     
- 
 retu
@@ -445,20 +445,16 @@
 eturn (%0A
-    
         
@@ -503,36 +503,32 @@
 e%22%3E%0A            
-    
 %3CPlantListAddBox
@@ -548,24 +548,15 @@
     
-    
 onAdd=%7B
-this.
 prop
@@ -576,36 +576,32 @@
  /%3E%0A            
-    
 %3CPlantList%0A     
@@ -615,20 +615,16 @@
     
-  
-  
 plants=%7B
 this
@@ -619,21 +619,16 @@
 plants=%7B
-this.
 props.pl
@@ -649,20 +649,16 @@
         
-    
 filterSt
@@ -663,21 +663,16 @@
 String=%7B
-this.
 props.fi
@@ -699,20 +699,16 @@
         
-    
 sortType
@@ -713,13 +713,8 @@
 pe=%7B
-this.
 prop
@@ -744,57 +744,426 @@
     
-    %7B
+%7BplantView%7D%0A        %3C/div%3E%0A    );%0A%7D;%0A%0A
 plant
+s
 View
-%7D%0A            %3C/div%3E%0A        );%0A    %7D%0A%7D
+Page.propTypes = %7B%0A    editing: React.PropTypes.bool.isRequired,%0A    filter: React.PropTypes.func.isRequired,%0A    onAddPlant: React.PropTypes.func.isRequired,%0A    onEdit: React.PropTypes.func.isRequired,%0A    plants: React.PropTypes.object.isRequired,%0A    selectedPlantName: React.PropTypes.string,%0A    sort: React.PropTypes.func.isRequired%0A%7D;%0A%0Aexport default plantsViewPage;

Convert `PlantsViewPage` to an a stateless component