diff options
| author | adamhrv <adam@ahprojects.com> | 2019-01-21 11:03:39 +0100 |
|---|---|---|
| committer | adamhrv <adam@ahprojects.com> | 2019-01-21 11:03:39 +0100 |
| commit | dc56b3326d7776e626039eb144e29562e9fdf355 (patch) | |
| tree | 2edbddd0885cfdb59e202bde43bc1b7c692ae4ed /client/faceSearch | |
| parent | e06af50389f849be0bfe4fa97d39f4519ef2c711 (diff) | |
| parent | 3ea3d6991f50c9cd94d8a9b4130c3194bd50e160 (diff) | |
Merge branch 'master' of github.com:adamhrv/megapixels_dev
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> |
