diff options
Diffstat (limited to 'client/faceAnalysis/faceAnalysis.result.js')
| -rw-r--r-- | client/faceAnalysis/faceAnalysis.result.js | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/client/faceAnalysis/faceAnalysis.result.js b/client/faceAnalysis/faceAnalysis.result.js index 63a23d65..fd079529 100644 --- a/client/faceAnalysis/faceAnalysis.result.js +++ b/client/faceAnalysis/faceAnalysis.result.js @@ -1,7 +1,6 @@ import React, { Component } from 'react' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' -import { courtesyS } from '../util' import * as actions from './faceAnalysis.actions' import { Loader } from '../common' @@ -63,16 +62,25 @@ class FaceAnalysisResult extends Component { <div className='result'></div> ) } - let blurImg = data.data.blur_fn && ( - <div> - <img src={data.data.blur_fn} /> - <span>Blurred image</span> - </div> - ) + const results = ['blur_fn', 'landmarks_3d_68'].map(tag => { + if (tag in data.data) { + const { title, url } = data.data[tag] + return ( + <div key={tag}> + <img src={url} /> + <span>{title}</span> + </div> + ) + } + return null + }).filter(a => a) + return ( - <div className='result'> + <div> {!(step && total && message) ? '' : (<span>{step} / {total}: {message}</span>)} - {blurImg} + <div className='results'> + {results} + </div> <div className="about"> <small>Query took {(timing / 1000).toFixed(2)} s.</small> </div> |
