Browse Source

Update response.jsx to use already existing, fromJSOrdered function

bubble
Owen Conti 7 years ago
parent
commit
a47cc284f7
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      src/core/components/response.jsx

+ 2
- 3
src/core/components/response.jsx View File

@@ -1,7 +1,7 @@
import React from "react" import React from "react"
import PropTypes from "prop-types" import PropTypes from "prop-types"
import { fromJS, Seq } from "immutable" import { fromJS, Seq } from "immutable"
import { getSampleSchema } from "core/utils"
import { getSampleSchema, fromJSOrdered } from "core/utils"


const getExampleComponent = ( sampleResponse, examples, HighlightCode ) => { const getExampleComponent = ( sampleResponse, examples, HighlightCode ) => {
if ( examples && examples.size ) { if ( examples && examples.size ) {
@@ -58,7 +58,6 @@ export default class Response extends React.Component {
code, code,
response, response,
className, className,

fn, fn,
getComponent, getComponent,
specSelectors, specSelectors,
@@ -117,7 +116,7 @@ export default class Response extends React.Component {
<ModelExample <ModelExample
getComponent={ getComponent } getComponent={ getComponent }
specSelectors={ specSelectors } specSelectors={ specSelectors }
schema={ fromJS(schema, (key, value) => value.toOrderedMap() ) }
schema={ fromJSOrdered(schema) }
example={ example }/> example={ example }/>
) : null} ) : null}




Loading…
Cancel
Save