mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-03 11:30:28 -05:00
@@ -36,7 +36,7 @@ var SlideShow = React.createClass({
|
||||
.valueSeq()
|
||||
.map(ref => ref.deref()))
|
||||
}).then(sets => {
|
||||
this.setState({photos: Immutable.Set().union(...sets)})
|
||||
this.setState({photos: Immutable.Set(sets[0]).intersect(...sets)})
|
||||
});
|
||||
|
||||
return <div style={containerStyle}>{
|
||||
@@ -64,6 +64,7 @@ var Item = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {
|
||||
blob: null,
|
||||
tags: Immutable.Set(),
|
||||
};
|
||||
},
|
||||
|
||||
@@ -72,11 +73,21 @@ var Item = React.createClass({
|
||||
p => p.get('image').deref()).then(
|
||||
b => this.setState({blob: b}));
|
||||
|
||||
this.props.photoRef.deref().then(
|
||||
p => p.get('tags').deref()).then(
|
||||
tags => this.setState({tags: tags}));
|
||||
|
||||
if (this.state.blob == null) {
|
||||
return <span>loading...</span>;
|
||||
}
|
||||
|
||||
return <img style={imageStyle} src={URL.createObjectURL(this.state.blob)}/>
|
||||
return (
|
||||
<div style={{display:'inline-block'}}>
|
||||
<img style={imageStyle} src={URL.createObjectURL(this.state.blob)}/>
|
||||
<br/>
|
||||
{this.state.tags.toArray().join(', ')}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@ class Ref{
|
||||
return this._promise;
|
||||
}
|
||||
|
||||
valueOf() {
|
||||
return this.ref;
|
||||
}
|
||||
|
||||
// BUG 88 (instance of is failing in dev build)
|
||||
static isRef(ref) {
|
||||
return ref && ref._isRef === isRef;
|
||||
|
||||
Reference in New Issue
Block a user