diff --git a/js/components/whitelabel/wallet/components/ascribe_detail/wallet_piece_container.js b/js/components/whitelabel/wallet/components/ascribe_detail/wallet_piece_container.js index adbd3e95..fa049a6f 100644 --- a/js/components/whitelabel/wallet/components/ascribe_detail/wallet_piece_container.js +++ b/js/components/whitelabel/wallet/components/ascribe_detail/wallet_piece_container.js @@ -17,7 +17,7 @@ import ApiUrls from '../../../../../constants/api_urls'; import { getLangText } from '../../../../../utils/lang_utils'; import { mergeOptions } from '../../../../../utils/general_utils'; - +import AppConstants from '../../../../../constants/application_constants'; let WalletPieceContainer = React.createClass({ @@ -30,54 +30,63 @@ let WalletPieceContainer = React.createClass({ render() { - return ( - -
-

{this.props.piece.title}

- - -
- + if(this.props.piece && this.props.piece.title) { + return ( + +
+

{this.props.piece.title}

+ + +
+ } - subheader={ + subheader={

}> - - 0}> - - - - {return {'id': this.props.piece.id}; }} - label={getLangText('Personal note (private)')} - defaultValue={this.props.piece.private_note || null} - placeholder={getLangText('Enter your comments ...')} - editable={true} - successMessage={getLangText('Private note saved')} - url={ApiUrls.note_private_piece} - currentUser={this.props.currentUser}/> - + + 0}> + + + + {return {'id': this.props.piece.id}; }} + label={getLangText('Personal note (private)')} + defaultValue={this.props.piece.private_note || null} + placeholder={getLangText('Enter your comments ...')} + editable={true} + successMessage={getLangText('Private note saved')} + url={ApiUrls.note_private_piece} + currentUser={this.props.currentUser}/> + - {this.props.children} -
- ); + {this.props.children} +
+ ); + } + else { + return ( +
+ +
+ ); + } } });