diff --git a/js/components/ascribe_detail/detail_property.js b/js/components/ascribe_detail/detail_property.js
index 991226f9..828ed81a 100644
--- a/js/components/ascribe_detail/detail_property.js
+++ b/js/components/ascribe_detail/detail_property.js
@@ -17,7 +17,7 @@ let DetailProperty = React.createClass({
getDefaultProps() {
return {
- separator: ':',
+ separator: '',
labelClassName: 'col-xs-3 col-sm-3 col-md-2 col-lg-2 col-xs-height col-bottom ascribe-detail-property-label',
valueClassName: 'col-xs-9 col-sm-9 col-md-10 col-lg-10 col-xs-height col-bottom ascribe-detail-property-value'
};
diff --git a/js/components/whitelabel/prize/components/ascribe_detail/piece_container.js b/js/components/whitelabel/prize/components/ascribe_detail/piece_container.js
index b552f073..069548ce 100644
--- a/js/components/whitelabel/prize/components/ascribe_detail/piece_container.js
+++ b/js/components/whitelabel/prize/components/ascribe_detail/piece_container.js
@@ -1,6 +1,7 @@
'use strict';
import React from 'react';
+import Router from 'react-router';
import StarRating from 'react-star-rating';
@@ -32,17 +33,23 @@ import DetailProperty from '../../../../ascribe_detail/detail_property';
import ApiUrls from '../../../../../constants/api_urls';
import { mergeOptions } from '../../../../../utils/general_utils';
import { getLangText } from '../../../../../utils/lang_utils';
+
+let Link = Router.Link;
+
/**
* This is the component that implements resource/data specific functionality
*/
let PieceContainer = React.createClass({
getInitialState() {
- return PieceStore.getState();
+ return mergeOptions(
+ PieceStore.getState(),
+ UserStore.getState()
+ );
},
componentDidMount() {
PieceStore.listen(this.onChange);
- PieceActions.fetchOne(this.props.params.pieceId);
+ UserStore.listen(this.onChange);
},
componentWillUnmount() {
@@ -52,6 +59,16 @@ let PieceContainer = React.createClass({
// the piece detail a second time
PieceActions.updatePiece({});
PieceStore.unlisten(this.onChange);
+ UserStore.unlisten(this.onChange);
+ },
+
+ componentDidUpdate() {
+ console.log('call me ')
+ PieceActions.fetchOne(this.props.params.pieceId);
+ },
+
+ shouldComponentUpdate(nextProps, nextState) {
+ return this.props.params.pieceId !== nextProps.params.pieceId
},
onChange(state) {
@@ -63,6 +80,7 @@ let PieceContainer = React.createClass({
},
render() {
+ console.log(this.props)
if('title' in this.state.piece) {
return (
{this.state.piece.title}