1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Update multiline destructuring format based on style guide

This commit is contained in:
Brett Sun 2016-01-18 14:46:39 +01:00
parent 821fe79461
commit e5cae3fc34
20 changed files with 148 additions and 173 deletions

View File

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

View File

@ -44,8 +44,7 @@ export default function ({ 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

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

View File

@ -95,10 +95,9 @@ let EditionActionPanel = React.createClass({
},
render() {
const {
actionPanelButtonListType: ActionPanelButtonListType,
edition,
currentUser } = this.props;
const { actionPanelButtonListType: ActionPanelButtonListType,
currentUser,
edition } = this.props;
if (edition &&
edition.notifications &&

View File

@ -53,8 +53,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

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

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

View File

@ -127,19 +127,18 @@ let FileDragAndDrop = React.createClass({
},
render: function () {
const {
filesToUpload,
dropzoneInactive,
className,
hashingProgress,
handleCancelHashing,
multiple,
enableLocalHashing,
uploadMethod,
fileClassToUpload,
const { allowedExtensions,
areAssetsDownloadable,
areAssetsEditable,
allowedExtensions } = this.props;
className,
dropzoneInactive,
enableLocalHashing,
fileClassToUpload,
filesToUpload,
handleCancelHashing,
hashingProgress,
multiple,
uploadMethod } = this.props;
// has files only is true if there are files that do not have the status deleted or canceled
let hasFiles = filesToUpload.filter((file) => file.status !== 'deleted' && file.status !== 'canceled' && file.size !== -1).length > 0;

View File

@ -35,13 +35,12 @@ let FileDragAndDropDialog = React.createClass({
},
render() {
const {
const { enableLocalHashing,
fileClassToUpload,
hasFiles,
multipleFiles,
enableLocalHashing,
uploadMethod,
fileClassToUpload,
onClick } = this.props;
onClick,
uploadMethod } = this.props;
if (hasFiles) {
return null;

View File

@ -145,9 +145,7 @@ export default function UploadButton({ className = 'btn btn-default btn-sm' } =
},
render() {
const {
multiple,
allowedExtensions } = this.props;
const { allowedExtensions, multiple } = this.props;
const { disabled } = this.state;

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

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

View File

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

View File

@ -53,8 +53,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,

View File

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

View File

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

View File

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