mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +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() {
|
||||
const {
|
||||
linkData,
|
||||
const { badge,
|
||||
buttons,
|
||||
children,
|
||||
className,
|
||||
thumbnail,
|
||||
heading,
|
||||
linkData,
|
||||
subheading,
|
||||
subsubheading,
|
||||
buttons,
|
||||
badge,
|
||||
children } = this.props;
|
||||
thumbnail } = this.props;
|
||||
|
||||
return (
|
||||
<div className="row">
|
||||
|
@ -44,8 +44,7 @@ let AccordionListItemPiece = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
artistName,
|
||||
const { artistName,
|
||||
badge,
|
||||
buttons,
|
||||
children,
|
||||
|
@ -66,8 +66,7 @@ let AclButtonList = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
availableAcls,
|
||||
const { availableAcls,
|
||||
buttonsStyle,
|
||||
className,
|
||||
currentUser,
|
||||
|
@ -41,8 +41,7 @@ export default function AclButton({ action, displayName, title, tooltip }) {
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
availableAcls,
|
||||
const { availableAcls,
|
||||
buttonAcceptClassName,
|
||||
currentUser,
|
||||
email,
|
||||
|
@ -32,8 +32,7 @@ const DetailProperty = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
children,
|
||||
const { children,
|
||||
className,
|
||||
ellipsis,
|
||||
label,
|
||||
|
@ -53,8 +53,7 @@ let Edition = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
actionPanelButtonListType,
|
||||
const { actionPanelButtonListType,
|
||||
coaError,
|
||||
currentUser,
|
||||
edition,
|
||||
|
@ -101,8 +101,7 @@ let EditionActionPanel = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
actionPanelButtonListType: ActionPanelButtonListType,
|
||||
const { actionPanelButtonListType: ActionPanelButtonListType,
|
||||
currentUser,
|
||||
edition,
|
||||
whitelabel } = this.props;
|
||||
|
@ -45,8 +45,7 @@ let FurtherDetailsFileuploader = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
editable,
|
||||
const { editable,
|
||||
isReadyForFormSubmission,
|
||||
multiple,
|
||||
onValidationFailed,
|
||||
|
@ -54,8 +54,7 @@ let AclFormFactory = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
action,
|
||||
const { action,
|
||||
autoFocusProperty,
|
||||
pieceOrEditions,
|
||||
currentUser,
|
||||
|
@ -62,8 +62,7 @@ let ConsignForm = React.createClass({
|
||||
|
||||
render() {
|
||||
const { email } = this.state;
|
||||
const {
|
||||
autoFocusProperty,
|
||||
const { autoFocusProperty,
|
||||
createPublicContractAgreement,
|
||||
email: defaultEmail,
|
||||
handleSuccess,
|
||||
|
@ -118,8 +118,7 @@ let LoanForm = React.createClass({
|
||||
|
||||
render() {
|
||||
const { email } = this.state;
|
||||
const {
|
||||
children,
|
||||
const { children,
|
||||
createPublicContractAgreement,
|
||||
email: defaultEmail,
|
||||
handleSuccess,
|
||||
|
@ -44,8 +44,7 @@ let LoginForm = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
headerMessage,
|
||||
const { headerMessage,
|
||||
location: { query: { email: emailQuery } },
|
||||
submitMessage } = this.props;
|
||||
|
||||
|
@ -117,8 +117,7 @@ let RegisterPieceForm = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
children,
|
||||
const { children,
|
||||
currentUser,
|
||||
disabled,
|
||||
enableLocalHashing,
|
||||
|
@ -58,8 +58,7 @@ let SignupForm = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
children,
|
||||
const { children,
|
||||
headerMessage,
|
||||
location: { query: { email: emailQuery } },
|
||||
submitMessage } = this.props;
|
||||
|
@ -144,13 +144,11 @@ const InputContractAgreementCheckbox = React.createClass({
|
||||
const contractAgreement = this.getContractAgreement();
|
||||
|
||||
if (contractAgreement) {
|
||||
const {
|
||||
datetime_accepted: datetimeAccepted,
|
||||
contract: {
|
||||
const { contract: {
|
||||
issuer: contractIssuer,
|
||||
blob: { url_safe: contractUrl }
|
||||
}
|
||||
} = contractAgreement;
|
||||
},
|
||||
datetime_accepted: datetimeAccepted } = contractAgreement;
|
||||
|
||||
if (datetimeAccepted) {
|
||||
return (
|
||||
@ -168,10 +166,7 @@ const InputContractAgreementCheckbox = React.createClass({
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
const {
|
||||
name,
|
||||
disabled,
|
||||
style } = this.props;
|
||||
const { disabled, name, style } = this.props;
|
||||
|
||||
return (
|
||||
<InputCheckbox
|
||||
|
@ -81,8 +81,7 @@ const InputFineUploader = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
areAssetsDownloadable,
|
||||
const { areAssetsDownloadable,
|
||||
createBlobRoutine,
|
||||
enableLocalHashing,
|
||||
disabled,
|
||||
|
@ -176,16 +176,14 @@ let FileDragAndDrop = React.createClass({
|
||||
},
|
||||
|
||||
render: function () {
|
||||
const {
|
||||
filesToUpload,
|
||||
const { allowedExtensions,
|
||||
dropzoneInactive,
|
||||
hashingProgress,
|
||||
handleCancelHashing,
|
||||
multiple,
|
||||
showError,
|
||||
errorClass,
|
||||
fileClassToUpload,
|
||||
allowedExtensions } = this.props;
|
||||
filesToUpload,
|
||||
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
|
||||
const hasFiles = filesToUpload
|
||||
|
@ -34,12 +34,11 @@ let FileDragAndDropDialog = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
multipleFiles,
|
||||
enableLocalHashing,
|
||||
uploadMethod,
|
||||
const { enableLocalHashing,
|
||||
fileClassToUpload,
|
||||
onClick } = this.props;
|
||||
multipleFiles,
|
||||
onClick,
|
||||
uploadMethod } = this.props;
|
||||
let dialogElement;
|
||||
|
||||
if (enableLocalHashing && !uploadMethod) {
|
||||
|
@ -146,9 +146,7 @@ export default function UploadButton({ className = 'btn btn-default btn-sm', sho
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
multiple,
|
||||
allowedExtensions } = this.props;
|
||||
const { allowedExtensions, multiple } = this.props;
|
||||
const { disabled } = this.state;
|
||||
|
||||
|
||||
|
@ -1058,8 +1058,7 @@ const ReactS3FineUploader = React.createClass({
|
||||
|
||||
render() {
|
||||
const { errorState: { errorClass }, filesToUpload, uploadInProgress } = this.state;
|
||||
const {
|
||||
areAssetsDownloadable,
|
||||
const { areAssetsDownloadable,
|
||||
areAssetsEditable,
|
||||
enableLocalHashing,
|
||||
fileClassToUpload,
|
||||
|
@ -53,11 +53,10 @@ let GlobalNotification = React.createClass({
|
||||
},
|
||||
|
||||
renderNotification() {
|
||||
const {
|
||||
notificationQueue: [notification],
|
||||
notificationStatus,
|
||||
const { containerWidth,
|
||||
notificationsPaused,
|
||||
containerWidth } = this.state;
|
||||
notificationQueue: [notification],
|
||||
notificationStatus } = this.state;
|
||||
|
||||
const notificationClasses = [];
|
||||
|
||||
|
@ -277,8 +277,7 @@ let PieceList = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
accordionListItemType: AccordionListItemType,
|
||||
const { accordionListItemType: AccordionListItemType,
|
||||
bulkModalButtonListType: BulkModalButtonListType,
|
||||
currentUser,
|
||||
customSubmitButton,
|
||||
|
@ -281,8 +281,7 @@ let PrizePieceRatings = React.createClass({
|
||||
},
|
||||
|
||||
fetchRatingsIfAuthorized(state = this.state) {
|
||||
const {
|
||||
currentUser: {
|
||||
const { currentUser: {
|
||||
is_admin: isAdmin,
|
||||
is_judge: isJudge,
|
||||
is_jury: isJury
|
||||
|
@ -34,8 +34,7 @@ let WalletPieceContainer = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
children,
|
||||
const { children,
|
||||
currentUser,
|
||||
handleDeleteSuccess,
|
||||
loadPiece,
|
||||
|
@ -27,8 +27,7 @@ let MarketAclButtonList = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
availableAcls,
|
||||
const { availableAcls,
|
||||
children,
|
||||
className,
|
||||
currentUser,
|
||||
|
@ -32,8 +32,7 @@ let MarketSubmitButton = React.createClass({
|
||||
|
||||
canEditionBeSubmitted(edition) {
|
||||
if (edition && edition.extra_data && edition.other_data) {
|
||||
const {
|
||||
extra_data: {
|
||||
const { extra_data: {
|
||||
artist_bio: artistBio,
|
||||
display_instructions: displayInstructions,
|
||||
technology_details: technologyDetails,
|
||||
@ -78,8 +77,7 @@ let MarketSubmitButton = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
availableAcls,
|
||||
const { availableAcls,
|
||||
currentUser,
|
||||
className,
|
||||
editions,
|
||||
|
@ -107,8 +107,7 @@ let MarketAdditionalDataForm = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
editable,
|
||||
const { editable,
|
||||
extraData = {},
|
||||
isInline,
|
||||
handleSuccess,
|
||||
|
@ -27,8 +27,7 @@ let MarketPieceList = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
currentUser: { email: userEmail },
|
||||
const { currentUser: { email: userEmail },
|
||||
whitelabel: {
|
||||
name: whitelabelName = 'Market',
|
||||
user: whitelabelAdminEmail
|
||||
|
@ -101,8 +101,7 @@ let MarketRegisterPiece = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const {
|
||||
location,
|
||||
const { location,
|
||||
whitelabel: {
|
||||
name: whitelabelName = 'Market'
|
||||
} } = this.props
|
||||
|
Loading…
Reference in New Issue
Block a user