1
0
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:
Tim Daubenschütz 2016-02-09 09:27:26 +01:00
commit dad4ea4e87
29 changed files with 218 additions and 254 deletions

View File

@ -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">

View File

@ -44,8 +44,7 @@ let AccordionListItemPiece = React.createClass({
},
render() {
const {
artistName,
const { artistName,
badge,
buttons,
children,

View File

@ -66,8 +66,7 @@ let AclButtonList = React.createClass({
},
render() {
const {
availableAcls,
const { availableAcls,
buttonsStyle,
className,
currentUser,

View File

@ -41,8 +41,7 @@ export default function AclButton({ action, displayName, title, tooltip }) {
},
render() {
const {
availableAcls,
const { availableAcls,
buttonAcceptClassName,
currentUser,
email,

View File

@ -32,8 +32,7 @@ const DetailProperty = React.createClass({
},
render() {
const {
children,
const { children,
className,
ellipsis,
label,

View File

@ -53,8 +53,7 @@ let Edition = React.createClass({
},
render() {
const {
actionPanelButtonListType,
const { actionPanelButtonListType,
coaError,
currentUser,
edition,

View File

@ -101,8 +101,7 @@ let EditionActionPanel = React.createClass({
},
render() {
const {
actionPanelButtonListType: ActionPanelButtonListType,
const { actionPanelButtonListType: ActionPanelButtonListType,
currentUser,
edition,
whitelabel } = this.props;

View File

@ -45,8 +45,7 @@ let FurtherDetailsFileuploader = React.createClass({
},
render() {
const {
editable,
const { editable,
isReadyForFormSubmission,
multiple,
onValidationFailed,

View File

@ -54,8 +54,7 @@ let AclFormFactory = React.createClass({
},
render() {
const {
action,
const { action,
autoFocusProperty,
pieceOrEditions,
currentUser,

View File

@ -62,8 +62,7 @@ let ConsignForm = React.createClass({
render() {
const { email } = this.state;
const {
autoFocusProperty,
const { autoFocusProperty,
createPublicContractAgreement,
email: defaultEmail,
handleSuccess,

View File

@ -118,8 +118,7 @@ let LoanForm = React.createClass({
render() {
const { email } = this.state;
const {
children,
const { children,
createPublicContractAgreement,
email: defaultEmail,
handleSuccess,

View File

@ -44,8 +44,7 @@ let LoginForm = React.createClass({
},
render() {
const {
headerMessage,
const { headerMessage,
location: { query: { email: emailQuery } },
submitMessage } = this.props;

View File

@ -117,8 +117,7 @@ let RegisterPieceForm = React.createClass({
},
render() {
const {
children,
const { children,
currentUser,
disabled,
enableLocalHashing,

View File

@ -58,8 +58,7 @@ let SignupForm = React.createClass({
},
render() {
const {
children,
const { children,
headerMessage,
location: { query: { email: emailQuery } },
submitMessage } = this.props;

View File

@ -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

View File

@ -81,8 +81,7 @@ const InputFineUploader = React.createClass({
},
render() {
const {
areAssetsDownloadable,
const { areAssetsDownloadable,
createBlobRoutine,
enableLocalHashing,
disabled,

View File

@ -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

View File

@ -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) {

View File

@ -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;

View File

@ -1058,8 +1058,7 @@ const ReactS3FineUploader = React.createClass({
render() {
const { errorState: { errorClass }, filesToUpload, uploadInProgress } = this.state;
const {
areAssetsDownloadable,
const { areAssetsDownloadable,
areAssetsEditable,
enableLocalHashing,
fileClassToUpload,

View File

@ -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 = [];

View File

@ -277,8 +277,7 @@ let PieceList = React.createClass({
},
render() {
const {
accordionListItemType: AccordionListItemType,
const { accordionListItemType: AccordionListItemType,
bulkModalButtonListType: BulkModalButtonListType,
currentUser,
customSubmitButton,

View File

@ -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

View File

@ -34,8 +34,7 @@ let WalletPieceContainer = React.createClass({
},
render() {
const {
children,
const { children,
currentUser,
handleDeleteSuccess,
loadPiece,

View File

@ -27,8 +27,7 @@ let MarketAclButtonList = React.createClass({
},
render() {
const {
availableAcls,
const { availableAcls,
children,
className,
currentUser,

View File

@ -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,

View File

@ -107,8 +107,7 @@ let MarketAdditionalDataForm = React.createClass({
},
render() {
const {
editable,
const { editable,
extraData = {},
isInline,
handleSuccess,

View File

@ -27,8 +27,7 @@ let MarketPieceList = React.createClass({
},
render() {
const {
currentUser: { email: userEmail },
const { currentUser: { email: userEmail },
whitelabel: {
name: whitelabelName = 'Market',
user: whitelabelAdminEmail

View File

@ -101,8 +101,7 @@ let MarketRegisterPiece = React.createClass({
},
render() {
const {
location,
const { location,
whitelabel: {
name: whitelabelName = 'Market'
} } = this.props