-
Notifications
You must be signed in to change notification settings - Fork 3
/
number.js
39 lines (32 loc) · 911 Bytes
/
number.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/** @format
*
* Decorate a search for a sole number. This can be an audio stop number or an accession number?
* Maybe eventually a year or time period?
*
* TODO implement accession number recognition and lifting
*/
var React = require('react')
const Image = require('../image')
var { getFacetAndValue } = require('../artwork/creator')
var NumberDecorator = React.createClass({
render() {
const term = this.props.term[0]
const hits = this.props.hits
const matchingAccessionNumber =
term.match(/\d+.\d+/) &&
hits.find(hit => hit._source.accession_number === term)
return <span>number decorator goes here</span>
},
})
const AccessionLifter = React.createClass({
render() {
const { hit } = this.props
const art = hit._source
return (
<div>
<p>Searching for an accession number?</p>
</div>
)
},
})
module.exports = NumberDecorator