diff options
Diffstat (limited to 'client/faceSearch')
| -rw-r--r-- | client/faceSearch/faceSearch.query.js | 17 | ||||
| -rw-r--r-- | client/faceSearch/faceSearch.result.js | 1 |
2 files changed, 11 insertions, 7 deletions
diff --git a/client/faceSearch/faceSearch.query.js b/client/faceSearch/faceSearch.query.js index 2d140813..8a82373e 100644 --- a/client/faceSearch/faceSearch.query.js +++ b/client/faceSearch/faceSearch.query.js @@ -19,6 +19,11 @@ class FaceSearchQuery extends Component { } upload(blob) { + if (this.state.image) { + URL.revokeObjectURL(this.state.image) + } + const url = URL.createObjectURL(blob) + this.setState({ image: url }) this.props.actions.upload(this.props.payload, blob) } @@ -37,17 +42,17 @@ class FaceSearchQuery extends Component { <div className='uploadContainer'> <div style={style}> {image ? null : <img src="/assets/img/icon_camera.svg" />} + {result.loading && ( + <div className='loading' style={style}> + <Loader /> + </div> + )} <UploadImage onUpload={this.upload.bind(this)} /> </div> - {result.loading && ( - <div className='loading' style={style}> - <Loader /> - </div> - )} </div> <div className='cta'> <h2>Search by Image</h2> - <h3>Searching {13456} images</h3> + <h3>Searching {13233} images</h3> <p> {'Use facial recognition to reverse search into the LFW dataset '} {'and see if it contains your photos.'} diff --git a/client/faceSearch/faceSearch.result.js b/client/faceSearch/faceSearch.result.js index c2509033..00dec160 100644 --- a/client/faceSearch/faceSearch.result.js +++ b/client/faceSearch/faceSearch.result.js @@ -49,7 +49,6 @@ class FaceSearchResult extends Component { return ( <div className='result'> <div> - <Loader /><br /> <h2>Searching...</h2> </div> </div> |
