<gh_stars>0
{"ast":null,"code":"var _jsxFileName = \"I:\\\\PRACTISE\\\\robofriends\\\\src\\\\App.js\";\nimport React, { Component } from \"react\";\nimport CardList from \"./CardList\";\nimport SearchBox from \"./SearchBox\";\nimport { robots } from \"./robots\";\n\nclass App extends Component {\n  constructor() {\n    super();\n\n    this.onSearchChange = event => {\n      //this.setState({ searchField: event.target.value });\n      const filteredRobots = this.state.robots.filter(robot => {\n        return robots.name.toLowerCase().includes(this.state.searchField.toLowerCase());\n      });\n    };\n\n    this.state = {\n      robots: robots,\n      searchField: \"\"\n    };\n  }\n\n  render() {\n    return React.createElement(\"div\", {\n      className: \"tc\",\n      __source: {\n        fileName: _jsxFileName,\n        lineNumber: 25\n      },\n      __self: this\n    }, React.createElement(\"h1\", {\n      __source: {\n        fileName: _jsxFileName,\n        lineNumber: 26\n      },\n      __self: this\n    }, \"RoboFriends\"), React.createElement(SearchBox, {\n      searchChange: this.onSearchChange,\n      __source: {\n        fileName: _jsxFileName,\n        lineNumber: 27\n      },\n      __self: this\n    }), React.createElement(CardList, {\n      robots: this.state.robots,\n      __source: {\n        fileName: _jsxFileName,\n        lineNumber: 28\n      },\n      __self: this\n    }), \";\");\n  }\n\n}\n\nexport default App;","map":{"version":3,"sources":["I:/PRACTISE/robofriends/src/App.js"],"names":["React","Component","CardList","SearchBox","robots","App","constructor","onSearchChange","event","filteredRobots","state","filter","robot","name","toLowerCase","includes","searchField","render"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,SAASC,MAAT,QAAuB,UAAvB;;AAEA,MAAMC,GAAN,SAAkBJ,SAAlB,CAA4B;AAC1BK,EAAAA,WAAW,GAAG;AACZ;;AADY,SAOdC,cAPc,GAOGC,KAAK,IAAI;AACxB;AACA,YAAMC,cAAc,GAAG,KAAKC,KAAL,CAAWN,MAAX,CAAkBO,MAAlB,CAAyBC,KAAK,IAAI;AACvD,eAAOR,MAAM,CAACS,IAAP,CACJC,WADI,GAEJC,QAFI,CAEK,KAAKL,KAAL,CAAWM,WAAX,CAAuBF,WAAvB,EAFL,CAAP;AAGD,OAJsB,CAAvB;AAKD,KAda;;AAEZ,SAAKJ,KAAL,GAAa;AACXN,MAAAA,MAAM,EAAEA,MADG;AAEXY,MAAAA,WAAW,EAAE;AAFF,KAAb;AAID;;AAUDC,EAAAA,MAAM,GAAG;AACP,WACE;AAAK,MAAA,SAAS,EAAC,IAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBADF,EAEE,oBAAC,SAAD;AAAW,MAAA,YAAY,EAAE,KAAKV,cAA9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAFF,EAGE,oBAAC,QAAD;AAAU,MAAA,MAAM,EAAE,KAAKG,KAAL,CAAWN,MAA7B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAHF,MADF;AAOD;;AAzByB;;AA4B5B,eAAeC,GAAf","sourcesContent":["import React, { Component } from \"react\";\r\nimport CardList from \"./CardList\";\r\nimport SearchBox from \"./SearchBox\";\r\nimport { robots } from \"./robots\";\r\n\r\nclass App extends Component {\r\n  constructor() {\r\n    super();\r\n    this.state = {\r\n      robots: robots,\r\n      searchField: \"\"\r\n    };\r\n  }\r\n  onSearchChange = event => {\r\n    //this.setState({ searchField: event.target.value });\r\n    const filteredRobots = this.state.robots.filter(robot => {\r\n      return robots.name\r\n        .toLowerCase()\r\n        .includes(this.state.searchField.toLowerCase());\r\n    });\r\n  };\r\n\r\n  render() {\r\n    return (\r\n      <div className=\"tc\">\r\n        <h1>RoboFriends</h1>\r\n        <SearchBox searchChange={this.onSearchChange} />\r\n        <CardList robots={this.state.robots} />;\r\n      </div>\r\n    );\r\n  }\r\n}\r\n\r\nexport default App;\r\n"]},"metadata":{},"sourceType":"module"}