mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
fix lint errors
This commit is contained in:
parent
026bffb5c3
commit
b2e3aaaeb5
4 changed files with 7 additions and 7 deletions
|
@ -6,9 +6,9 @@ export class AccountsFormMessage extends React.Component {
|
|||
let { message, type, className = 'message', style = {} } = this.props;
|
||||
message = _.isObject(message) ? message.message : message; // If message is object, then try to get message from it
|
||||
return message ? (
|
||||
<div style={style} className={[ className, type ].join(' ')}>{ message }</div>
|
||||
<div style={style} className={[className, type].join(' ')}>{ message }</div>
|
||||
) : null;
|
||||
}
|
||||
}
|
||||
|
||||
registerComponent('AccountsFormMessage', AccountsFormMessage);
|
||||
registerComponent('AccountsFormMessage', AccountsFormMessage);
|
||||
|
|
|
@ -29,7 +29,7 @@ const getTypeName = (field, fieldName, collection) => {
|
|||
};
|
||||
|
||||
const parseImageUrl = value => {
|
||||
const isImage = ['.png', '.jpg', '.gif'].indexOf(value.substr(-4)) !== -1 || ['.webp', '.jpeg' ].indexOf(value.substr(-5)) !== -1;
|
||||
const isImage = ['.png', '.jpg', '.gif'].indexOf(value.substr(-4)) !== -1 || ['.webp', '.jpeg'].indexOf(value.substr(-5)) !== -1;
|
||||
return isImage ?
|
||||
<img style={{width: '100%', minWidth: 80, maxWidth: 200, display: 'block'}} src={value} alt={value}/> :
|
||||
parseUrl(value);
|
||||
|
@ -187,4 +187,4 @@ Card.contextTypes = {
|
|||
intl: intlShape
|
||||
};
|
||||
|
||||
registerComponent('Card', Card);
|
||||
registerComponent('Card', Card);
|
||||
|
|
|
@ -47,7 +47,7 @@ class IntlDirective extends SchemaDirectiveVisitor {
|
|||
visitFieldDefinition(field, details) {
|
||||
const { resolve = defaultFieldResolver, name } = field;
|
||||
field.resolve = async function (...args) {
|
||||
const [ doc, graphQLArguments, context ] = args;
|
||||
const [doc, graphQLArguments, context] = args;
|
||||
const fieldValue = await resolve.apply(this, args);
|
||||
const locale = graphQLArguments.locale || context.locale;
|
||||
const defaultLocale = getSetting('locale');
|
||||
|
@ -178,4 +178,4 @@ export const getHeaderLocale = (headers, userLocale) => {
|
|||
|
||||
return locale;
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
@ -216,7 +216,7 @@ export const updateMutator = async ({ collection, documentId, selector, data, se
|
|||
}
|
||||
|
||||
// run sync callbacks
|
||||
data = await runCallbacks({ name:[ `${typeName.toLowerCase()}.update.before`, '*.update.before'], iterator: data, properties,});
|
||||
data = await runCallbacks({ name:[`${typeName.toLowerCase()}.update.before`, '*.update.before'], iterator: data, properties,});
|
||||
// OpenCRUD backwards compatibility
|
||||
data = modifierToData(await runCallbacks([`${collectionName.toLowerCase()}.edit.before`, `${collectionName.toLowerCase()}.edit.sync`], dataToModifier(data), document, currentUser, newDocument));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue