mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
Merge pull request #107 from ascribe/cosmetic-fix-for-multiline-destructure
Update multiline destructuring format based on style guide
This commit is contained in:
commit
dad4ea4e87
@ -21,16 +21,15 @@ let AccordionListItem = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { badge,
|
||||||
linkData,
|
buttons,
|
||||||
|
children,
|
||||||
className,
|
className,
|
||||||
thumbnail,
|
|
||||||
heading,
|
heading,
|
||||||
|
linkData,
|
||||||
subheading,
|
subheading,
|
||||||
subsubheading,
|
subsubheading,
|
||||||
buttons,
|
thumbnail } = this.props;
|
||||||
badge,
|
|
||||||
children } = this.props;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="row">
|
<div className="row">
|
||||||
|
@ -44,8 +44,7 @@ let AccordionListItemPiece = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { artistName,
|
||||||
artistName,
|
|
||||||
badge,
|
badge,
|
||||||
buttons,
|
buttons,
|
||||||
children,
|
children,
|
||||||
|
@ -66,8 +66,7 @@ let AclButtonList = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { availableAcls,
|
||||||
availableAcls,
|
|
||||||
buttonsStyle,
|
buttonsStyle,
|
||||||
className,
|
className,
|
||||||
currentUser,
|
currentUser,
|
||||||
|
@ -41,8 +41,7 @@ export default function AclButton({ action, displayName, title, tooltip }) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { availableAcls,
|
||||||
availableAcls,
|
|
||||||
buttonAcceptClassName,
|
buttonAcceptClassName,
|
||||||
currentUser,
|
currentUser,
|
||||||
email,
|
email,
|
||||||
|
@ -32,8 +32,7 @@ const DetailProperty = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { children,
|
||||||
children,
|
|
||||||
className,
|
className,
|
||||||
ellipsis,
|
ellipsis,
|
||||||
label,
|
label,
|
||||||
|
@ -53,8 +53,7 @@ let Edition = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { actionPanelButtonListType,
|
||||||
actionPanelButtonListType,
|
|
||||||
coaError,
|
coaError,
|
||||||
currentUser,
|
currentUser,
|
||||||
edition,
|
edition,
|
||||||
|
@ -101,8 +101,7 @@ let EditionActionPanel = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { actionPanelButtonListType: ActionPanelButtonListType,
|
||||||
actionPanelButtonListType: ActionPanelButtonListType,
|
|
||||||
currentUser,
|
currentUser,
|
||||||
edition,
|
edition,
|
||||||
whitelabel } = this.props;
|
whitelabel } = this.props;
|
||||||
|
@ -45,8 +45,7 @@ let FurtherDetailsFileuploader = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { editable,
|
||||||
editable,
|
|
||||||
isReadyForFormSubmission,
|
isReadyForFormSubmission,
|
||||||
multiple,
|
multiple,
|
||||||
onValidationFailed,
|
onValidationFailed,
|
||||||
|
@ -54,8 +54,7 @@ let AclFormFactory = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { action,
|
||||||
action,
|
|
||||||
autoFocusProperty,
|
autoFocusProperty,
|
||||||
pieceOrEditions,
|
pieceOrEditions,
|
||||||
currentUser,
|
currentUser,
|
||||||
|
@ -62,8 +62,7 @@ let ConsignForm = React.createClass({
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { email } = this.state;
|
const { email } = this.state;
|
||||||
const {
|
const { autoFocusProperty,
|
||||||
autoFocusProperty,
|
|
||||||
createPublicContractAgreement,
|
createPublicContractAgreement,
|
||||||
email: defaultEmail,
|
email: defaultEmail,
|
||||||
handleSuccess,
|
handleSuccess,
|
||||||
|
@ -118,8 +118,7 @@ let LoanForm = React.createClass({
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { email } = this.state;
|
const { email } = this.state;
|
||||||
const {
|
const { children,
|
||||||
children,
|
|
||||||
createPublicContractAgreement,
|
createPublicContractAgreement,
|
||||||
email: defaultEmail,
|
email: defaultEmail,
|
||||||
handleSuccess,
|
handleSuccess,
|
||||||
|
@ -44,8 +44,7 @@ let LoginForm = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { headerMessage,
|
||||||
headerMessage,
|
|
||||||
location: { query: { email: emailQuery } },
|
location: { query: { email: emailQuery } },
|
||||||
submitMessage } = this.props;
|
submitMessage } = this.props;
|
||||||
|
|
||||||
|
@ -117,8 +117,7 @@ let RegisterPieceForm = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { children,
|
||||||
children,
|
|
||||||
currentUser,
|
currentUser,
|
||||||
disabled,
|
disabled,
|
||||||
enableLocalHashing,
|
enableLocalHashing,
|
||||||
|
@ -58,8 +58,7 @@ let SignupForm = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { children,
|
||||||
children,
|
|
||||||
headerMessage,
|
headerMessage,
|
||||||
location: { query: { email: emailQuery } },
|
location: { query: { email: emailQuery } },
|
||||||
submitMessage } = this.props;
|
submitMessage } = this.props;
|
||||||
|
@ -143,16 +143,14 @@ const InputContractAgreementCheckbox = React.createClass({
|
|||||||
getContractCheckbox() {
|
getContractCheckbox() {
|
||||||
const contractAgreement = this.getContractAgreement();
|
const contractAgreement = this.getContractAgreement();
|
||||||
|
|
||||||
if(contractAgreement) {
|
if (contractAgreement) {
|
||||||
const {
|
const { contract: {
|
||||||
datetime_accepted: datetimeAccepted,
|
|
||||||
contract: {
|
|
||||||
issuer: contractIssuer,
|
issuer: contractIssuer,
|
||||||
blob: { url_safe: contractUrl }
|
blob: { url_safe: contractUrl }
|
||||||
}
|
},
|
||||||
} = contractAgreement;
|
datetime_accepted: datetimeAccepted } = contractAgreement;
|
||||||
|
|
||||||
if(datetimeAccepted) {
|
if (datetimeAccepted) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="notification-contract-pdf"
|
className="notification-contract-pdf"
|
||||||
@ -168,10 +166,7 @@ const InputContractAgreementCheckbox = React.createClass({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
const {
|
const { disabled, name, style } = this.props;
|
||||||
name,
|
|
||||||
disabled,
|
|
||||||
style } = this.props;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<InputCheckbox
|
<InputCheckbox
|
||||||
|
@ -60,11 +60,11 @@ const InputFineUploader = React.createClass({
|
|||||||
value: file.key
|
value: file.key
|
||||||
});
|
});
|
||||||
|
|
||||||
if(this.state.value && typeof this.props.onChange === 'function') {
|
if (this.state.value && typeof this.props.onChange === 'function') {
|
||||||
this.props.onChange({ target: { value: this.state.value } });
|
this.props.onChange({ target: { value: this.state.value } });
|
||||||
}
|
}
|
||||||
|
|
||||||
if(typeof this.props.submitFile === 'function') {
|
if (typeof this.props.submitFile === 'function') {
|
||||||
this.props.submitFile(file);
|
this.props.submitFile(file);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -81,8 +81,7 @@ const InputFineUploader = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { areAssetsDownloadable,
|
||||||
areAssetsDownloadable,
|
|
||||||
createBlobRoutine,
|
createBlobRoutine,
|
||||||
enableLocalHashing,
|
enableLocalHashing,
|
||||||
disabled,
|
disabled,
|
||||||
@ -102,7 +101,7 @@ const InputFineUploader = React.createClass({
|
|||||||
|
|
||||||
// if disabled is actually set by property, we want to override
|
// if disabled is actually set by property, we want to override
|
||||||
// isFineUploaderActive
|
// isFineUploaderActive
|
||||||
if(typeof disabled !== 'undefined') {
|
if (typeof disabled !== 'undefined') {
|
||||||
editable = !disabled;
|
editable = !disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ let FileDragAndDrop = React.createClass({
|
|||||||
handlePauseFile={this.handlePauseFile}
|
handlePauseFile={this.handlePauseFile}
|
||||||
handleResumeFile={this.handleResumeFile}
|
handleResumeFile={this.handleResumeFile}
|
||||||
areAssetsDownloadable={areAssetsDownloadable}
|
areAssetsDownloadable={areAssetsDownloadable}
|
||||||
areAssetsEditable={areAssetsEditable}/>
|
areAssetsEditable={areAssetsEditable} />
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -176,16 +176,14 @@ let FileDragAndDrop = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
const {
|
const { allowedExtensions,
|
||||||
filesToUpload,
|
|
||||||
dropzoneInactive,
|
dropzoneInactive,
|
||||||
hashingProgress,
|
|
||||||
handleCancelHashing,
|
|
||||||
multiple,
|
|
||||||
showError,
|
|
||||||
errorClass,
|
errorClass,
|
||||||
fileClassToUpload,
|
filesToUpload,
|
||||||
allowedExtensions } = this.props;
|
handleCancelHashing,
|
||||||
|
hashingProgress,
|
||||||
|
multiple,
|
||||||
|
showError } = this.props;
|
||||||
|
|
||||||
// has files only is true if there are files that do not have the status deleted, canceled, or failed
|
// has files only is true if there are files that do not have the status deleted, canceled, or failed
|
||||||
const hasFiles = filesToUpload
|
const hasFiles = filesToUpload
|
||||||
|
@ -34,12 +34,11 @@ let FileDragAndDropDialog = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { enableLocalHashing,
|
||||||
multipleFiles,
|
|
||||||
enableLocalHashing,
|
|
||||||
uploadMethod,
|
|
||||||
fileClassToUpload,
|
fileClassToUpload,
|
||||||
onClick } = this.props;
|
multipleFiles,
|
||||||
|
onClick,
|
||||||
|
uploadMethod } = this.props;
|
||||||
let dialogElement;
|
let dialogElement;
|
||||||
|
|
||||||
if (enableLocalHashing && !uploadMethod) {
|
if (enableLocalHashing && !uploadMethod) {
|
||||||
|
@ -146,9 +146,7 @@ export default function UploadButton({ className = 'btn btn-default btn-sm', sho
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { allowedExtensions, multiple } = this.props;
|
||||||
multiple,
|
|
||||||
allowedExtensions } = this.props;
|
|
||||||
const { disabled } = this.state;
|
const { disabled } = this.state;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1058,8 +1058,7 @@ const ReactS3FineUploader = React.createClass({
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { errorState: { errorClass }, filesToUpload, uploadInProgress } = this.state;
|
const { errorState: { errorClass }, filesToUpload, uploadInProgress } = this.state;
|
||||||
const {
|
const { areAssetsDownloadable,
|
||||||
areAssetsDownloadable,
|
|
||||||
areAssetsEditable,
|
areAssetsEditable,
|
||||||
enableLocalHashing,
|
enableLocalHashing,
|
||||||
fileClassToUpload,
|
fileClassToUpload,
|
||||||
|
@ -53,11 +53,10 @@ let GlobalNotification = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
renderNotification() {
|
renderNotification() {
|
||||||
const {
|
const { containerWidth,
|
||||||
notificationQueue: [notification],
|
|
||||||
notificationStatus,
|
|
||||||
notificationsPaused,
|
notificationsPaused,
|
||||||
containerWidth } = this.state;
|
notificationQueue: [notification],
|
||||||
|
notificationStatus } = this.state;
|
||||||
|
|
||||||
const notificationClasses = [];
|
const notificationClasses = [];
|
||||||
|
|
||||||
|
@ -277,8 +277,7 @@ let PieceList = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { accordionListItemType: AccordionListItemType,
|
||||||
accordionListItemType: AccordionListItemType,
|
|
||||||
bulkModalButtonListType: BulkModalButtonListType,
|
bulkModalButtonListType: BulkModalButtonListType,
|
||||||
currentUser,
|
currentUser,
|
||||||
customSubmitButton,
|
customSubmitButton,
|
||||||
|
@ -281,8 +281,7 @@ let PrizePieceRatings = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
fetchRatingsIfAuthorized(state = this.state) {
|
fetchRatingsIfAuthorized(state = this.state) {
|
||||||
const {
|
const { currentUser: {
|
||||||
currentUser: {
|
|
||||||
is_admin: isAdmin,
|
is_admin: isAdmin,
|
||||||
is_judge: isJudge,
|
is_judge: isJudge,
|
||||||
is_jury: isJury
|
is_jury: isJury
|
||||||
|
@ -34,8 +34,7 @@ let WalletPieceContainer = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { children,
|
||||||
children,
|
|
||||||
currentUser,
|
currentUser,
|
||||||
handleDeleteSuccess,
|
handleDeleteSuccess,
|
||||||
loadPiece,
|
loadPiece,
|
||||||
|
@ -27,8 +27,7 @@ let MarketAclButtonList = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { availableAcls,
|
||||||
availableAcls,
|
|
||||||
children,
|
children,
|
||||||
className,
|
className,
|
||||||
currentUser,
|
currentUser,
|
||||||
|
@ -32,8 +32,7 @@ let MarketSubmitButton = React.createClass({
|
|||||||
|
|
||||||
canEditionBeSubmitted(edition) {
|
canEditionBeSubmitted(edition) {
|
||||||
if (edition && edition.extra_data && edition.other_data) {
|
if (edition && edition.extra_data && edition.other_data) {
|
||||||
const {
|
const { extra_data: {
|
||||||
extra_data: {
|
|
||||||
artist_bio: artistBio,
|
artist_bio: artistBio,
|
||||||
display_instructions: displayInstructions,
|
display_instructions: displayInstructions,
|
||||||
technology_details: technologyDetails,
|
technology_details: technologyDetails,
|
||||||
@ -78,8 +77,7 @@ let MarketSubmitButton = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { availableAcls,
|
||||||
availableAcls,
|
|
||||||
currentUser,
|
currentUser,
|
||||||
className,
|
className,
|
||||||
editions,
|
editions,
|
||||||
|
@ -107,8 +107,7 @@ let MarketAdditionalDataForm = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { editable,
|
||||||
editable,
|
|
||||||
extraData = {},
|
extraData = {},
|
||||||
isInline,
|
isInline,
|
||||||
handleSuccess,
|
handleSuccess,
|
||||||
|
@ -27,8 +27,7 @@ let MarketPieceList = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { currentUser: { email: userEmail },
|
||||||
currentUser: { email: userEmail },
|
|
||||||
whitelabel: {
|
whitelabel: {
|
||||||
name: whitelabelName = 'Market',
|
name: whitelabelName = 'Market',
|
||||||
user: whitelabelAdminEmail
|
user: whitelabelAdminEmail
|
||||||
|
@ -101,8 +101,7 @@ let MarketRegisterPiece = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { location,
|
||||||
location,
|
|
||||||
whitelabel: {
|
whitelabel: {
|
||||||
name: whitelabelName = 'Market'
|
name: whitelabelName = 'Market'
|
||||||
} } = this.props
|
} } = this.props
|
||||||
|
Loading…
Reference in New Issue
Block a user