1- import React from " react" ;
2- import PropTypes from " prop-types" ;
1+ import React from ' react' ;
2+ import PropTypes from ' prop-types' ;
33
4- const Render = ( { component } ) => {
5- return < param type = "render" content = { component } /> ;
6- } ;
4+ const Render = ( { component } ) => < param type = "render" content = { component } /> ;
75
86Render . propTypes = {
97 component : PropTypes . func ,
@@ -13,13 +11,9 @@ const Content = ({ json, contentType, text }) => {
1311 const ComponentsArray = [ ] ;
1412
1513 if ( contentType )
16- ComponentsArray . push (
17- < param key = "contentType" type = "content-type" content = { contentType } />
18- ) ;
19- if ( json )
20- ComponentsArray . push ( < param key = "json" type = "json" content = { json } /> ) ;
21- if ( text )
22- ComponentsArray . push ( < param key = "text" type = "text" content = { text } /> ) ;
14+ ComponentsArray . push ( < param key = "contentType" type = "content-type" content = { contentType } /> ) ;
15+ if ( json ) ComponentsArray . push ( < param key = "json" type = "json" content = { json } /> ) ;
16+ if ( text ) ComponentsArray . push ( < param key = "text" type = "text" content = { text } /> ) ;
2317
2418 return ComponentsArray ;
2519} ;
@@ -30,26 +24,22 @@ Content.propTypes = {
3024 text : PropTypes . string ,
3125} ;
3226
33- const Status = ( { statusCode } ) => {
34- return < param type = "status" content = { statusCode } /> ;
35- } ;
27+ const Status = ( { statusCode } ) => < param type = "status" content = { statusCode } /> ;
3628
3729Status . propTypes = {
3830 statusCode : PropTypes . number ,
3931} ;
4032
41- const Redirect = ( { path, statusCode } ) => {
42- return < param type = "redirect" content = { { path, statusCode } } /> ;
43- } ;
33+ const Redirect = ( { path, statusCode } ) => < param type = "redirect" content = { { path, statusCode } } /> ;
4434
4535Redirect . propTypes = {
4636 path : PropTypes . string . isRequired ,
4737 statusCode : PropTypes . number ,
4838} ;
4939
50- const SendFile = ( { path, options, onError = ( ) => { } } ) => {
51- return < param type = "send-file" content = { { path, options, onError } } /> ;
52- } ;
40+ const SendFile = ( { path, options, onError = ( ) => { } } ) => (
41+ < param type = "send-file" content = { { path, options, onError } } />
42+ ) ;
5343
5444SendFile . propTypes = {
5545 path : PropTypes . string . isRequired ,
0 commit comments