Update Prettier

This commit is contained in:
Vesa Luusua 2018-05-09 16:38:43 +03:00
parent c49c3bb1a0
commit ae1f89c7b7
7 changed files with 28 additions and 9 deletions

View file

@ -11,7 +11,9 @@ const LineItemUnitPrice = props => {
const isDaily = unitType === LINE_ITEM_DAY;
const translationKey = isNightly
? 'BookingBreakdown.pricePerNight'
: isDaily ? 'BookingBreakdown.pricePerDay' : 'BookingBreakdown.pricePerQuantity';
: isDaily
? 'BookingBreakdown.pricePerDay'
: 'BookingBreakdown.pricePerQuantity';
const unitPurchase = transaction.attributes.lineItems.find(
item => item.code === unitType && !item.reversal

View file

@ -59,7 +59,9 @@ const EditListingLocationPanel = props => {
initialValues={initialSearchFormValues}
onSubmit={values => {
const { building = '', location } = values;
const { selectedPlace: { address, origin } } = location;
const {
selectedPlace: { address, origin },
} = location;
const updateValues = {
geolocation: origin,
publicData: {

View file

@ -118,7 +118,10 @@ class CurrencyInputComponent extends Component {
onInputBlur(event) {
event.preventDefault();
event.stopPropagation();
const { currencyConfig, input: { onBlur } } = this.props;
const {
currencyConfig,
input: { onBlur },
} = this.props;
this.setState(prevState => {
if (onBlur) {
// If parent component has provided onBlur function, call it with current price.
@ -134,7 +137,10 @@ class CurrencyInputComponent extends Component {
onInputFocus(event) {
event.preventDefault();
event.stopPropagation();
const { currencyConfig, input: { onFocus } } = this.props;
const {
currencyConfig,
input: { onFocus },
} = this.props;
this.setState(prevState => {
if (onFocus) {
// If parent component has provided onFocus function, call it with current price.

View file

@ -108,7 +108,12 @@ class TokenInputFieldComponent extends Component {
* @param {Object} values - values from different input types
*/
requestToken(values) {
const { country, currency, input: { onChange }, intl } = this.props;
const {
country,
currency,
input: { onChange },
intl,
} = this.props;
// First we have to clear the current token value so the parent
// form doesn't submit with an old value.

View file

@ -99,7 +99,9 @@ export const AddressLinkMaybe = props => {
const { lat, lng } = geolocation || {};
const hrefToGoogleMaps = geolocation
? `https://maps.google.com/?q=${lat},${lng}`
: address ? `https://maps.google.com/?q=${encodeURIComponent(address)}` : null;
: address
? `https://maps.google.com/?q=${encodeURIComponent(address)}`
: null;
const fullAddress =
typeof building === 'string' && building.length > 0 ? `${building}, ${address}` : address;

View file

@ -63,7 +63,9 @@ const estimatedTransaction = (unitType, bookingStart, bookingEnd, unitPrice, qua
const unitCount = isNightly
? nightsBetween(bookingStart, bookingEnd)
: isDaily ? daysBetween(bookingStart, bookingEnd) : quantity;
: isDaily
? daysBetween(bookingStart, bookingEnd)
: quantity;
const totalPrice = estimatedTotalPrice(unitPrice, unitCount);

View file

@ -6498,8 +6498,8 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier@^1.11.1:
version "1.11.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75"
version "1.12.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325"
pretty-bytes@^4.0.2:
version "4.0.2"