1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-28 16:48:04 +02:00
onion/js/components/ascribe_forms/list_form_request_actions.js
Brett Sun 84e8e4612f Autofocus message field in consignment form and use custom labels
For now, we’ll let the artist specify their suggested price in the
consignment form’s message field.
2015-11-10 18:24:46 +01:00

37 lines
1.1 KiB
JavaScript

'use strict';
import React from 'react';
import RequestActionForm from './form_request_action';
let ListRequestActions = React.createClass({
propTypes: {
pieceOrEditions: React.PropTypes.oneOfType([
React.PropTypes.object,
React.PropTypes.array
]).isRequired,
currentUser: React.PropTypes.object,
handleSuccess: React.PropTypes.func.isRequired,
notifications: React.PropTypes.array.isRequired
},
render () {
if (this.props.notifications &&
this.props.notifications.length > 0) {
return (
<div>
{this.props.notifications.map((notification) =>
<RequestActionForm
currentUser={this.props.currentUser}
pieceOrEditions={ this.props.pieceOrEditions }
notifications={notification}
handleSuccess={this.props.handleSuccess}/>)}
</div>
);
}
return null;
}
});
export default ListRequestActions;