mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
format with prettier
This commit is contained in:
parent
abdff325c8
commit
67f8bd92e4
7 changed files with 17 additions and 21 deletions
|
|
@ -129,7 +129,7 @@ app.get('*', (req, res) => {
|
|||
});
|
||||
|
||||
app.listen(PORT, () => {
|
||||
const mode = dev ? "development" : "production";
|
||||
const mode = dev ? 'development' : 'production';
|
||||
console.log(`Listening to port ${PORT} in ${mode} mode`);
|
||||
if (dev) {
|
||||
console.log(`Open http://localhost:${PORT}/ and start hacking!`);
|
||||
|
|
|
|||
|
|
@ -15,11 +15,7 @@ const EditListingPricingPanel = props => {
|
|||
return (
|
||||
<div className={classes}>
|
||||
<h1><FormattedMessage id="EditListingPricingPanel.title" /></h1>
|
||||
<EditListingPricingForm
|
||||
className={css.form}
|
||||
initialValues={{ price }}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
<EditListingPricingForm className={css.form} initialValues={{ price }} onSubmit={onSubmit} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@ export const ListingCardComponent = props => {
|
|||
: [];
|
||||
const mainImage = images.length > 0 ? images[0] : null;
|
||||
const imageURL = mainImage ? mainImage.sizes.find(i => i.name === 'landscape-crop').url : null;
|
||||
const image2XURL = mainImage ? mainImage.sizes.find(i => i.name === 'landscape-crop2x').url : null;
|
||||
const image2XURL = mainImage
|
||||
? mainImage.sizes.find(i => i.name === 'landscape-crop2x').url
|
||||
: null;
|
||||
const higherRes = image2XURL ? { srcSet: `${image2XURL} 2x` } : null;
|
||||
|
||||
// TODO: svg should have own loading strategy
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ export const ListingCardSmallComponent = props => {
|
|||
: [];
|
||||
const mainImage = images.length > 0 ? images[0] : null;
|
||||
const imageURL = mainImage ? mainImage.sizes.find(i => i.name === 'landscape-crop').url : null;
|
||||
const image2XURL = mainImage ? mainImage.sizes.find(i => i.name === 'landscape-crop2x').url : null;
|
||||
const image2XURL = mainImage
|
||||
? mainImage.sizes.find(i => i.name === 'landscape-crop2x').url
|
||||
: null;
|
||||
const higherRes = image2XURL ? { srcSet: `${image2XURL} 2x` } : null;
|
||||
|
||||
// TODO: svg should have own loading strategy
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export class EditListingLocationFormComponent extends Component {
|
|||
const classes = classNames(css.root, className);
|
||||
|
||||
return (
|
||||
<form className= {classes} onSubmit={handleSubmit}>
|
||||
<form className={classes} onSubmit={handleSubmit}>
|
||||
<Field
|
||||
autoFocus
|
||||
name="location"
|
||||
|
|
|
|||
|
|
@ -5,15 +5,8 @@ import { intlShape, injectIntl } from 'react-intl';
|
|||
import { isEqual } from 'lodash';
|
||||
import { arrayMove } from 'react-sortable-hoc';
|
||||
import classNames from 'classnames';
|
||||
import config from '../../config';
|
||||
import { noEmptyArray, required } from '../../util/validators';
|
||||
import {
|
||||
AddImages,
|
||||
Button,
|
||||
Input,
|
||||
StripeBankAccountToken,
|
||||
ValidationError,
|
||||
} from '../../components';
|
||||
import { noEmptyArray } from '../../util/validators';
|
||||
import { AddImages, Button, Input, ValidationError } from '../../components';
|
||||
|
||||
import css from './EditListingPhotosForm.css';
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,6 @@ export class ListingPageComponent extends Component {
|
|||
? currentListing.images.map(i => ({ id: i.id, sizes: i.attributes.sizes }))
|
||||
: [];
|
||||
|
||||
|
||||
// TODO: svg should have own loading strategy
|
||||
// Now noImageIcon is imported with default configuration (gives url)
|
||||
// This should be handled by ResponsiveImage or separate ImagePlaceholder component
|
||||
|
|
@ -137,7 +136,11 @@ export class ListingPageComponent extends Component {
|
|||
// TODO componentize
|
||||
const imageCarousel = images.length > 0
|
||||
? <div className={css.imageContainer}>
|
||||
<img className={css.mainImage} alt={title} src={images[0].sizes.find(i => i.name === 'landscape-crop').url} />
|
||||
<img
|
||||
className={css.mainImage}
|
||||
alt={title}
|
||||
src={images[0].sizes.find(i => i.name === 'landscape-crop').url}
|
||||
/>
|
||||
<div className={css.thumbnailContainer}>
|
||||
{images.slice(1).map(image => (
|
||||
<div key={image.id.uuid} className={css.thumbnailWrapper}>
|
||||
|
|
@ -160,7 +163,7 @@ export class ListingPageComponent extends Component {
|
|||
const showBookButton = !isOwnListing;
|
||||
|
||||
const authorAvailable = currentListing && currentListing.author;
|
||||
const authorProfile = authorAvailable && currentListing.author.attributes.profile
|
||||
const authorProfile = authorAvailable && currentListing.author.attributes.profile;
|
||||
const authorName = authorAvailable
|
||||
? `${authorProfile.firstName} ${authorProfile.lastName}`
|
||||
: '';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue