Use enableAvailability in EditListingWizard

This commit is contained in:
Jenni Nurmi 2019-01-16 12:47:17 +02:00
parent 72e20dfb56
commit 1d15936bae

View file

@ -3,6 +3,7 @@ import { array, bool, func, number, object, oneOf, shape, string } from 'prop-ty
import { compose } from 'redux';
import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
import classNames from 'classnames';
import config from '../../config';
import { withViewport } from '../../util/contextHelpers';
import {
LISTING_PAGE_PARAM_TYPE_DRAFT,
@ -24,9 +25,20 @@ import EditListingWizardTab, {
} from './EditListingWizardTab';
import css from './EditListingWizard.css';
// Show availability calendar only if environment variable availabilityEnabled is true
const availabilityMaybe = config.enableAvailability ? [AVAILABILITY] : [];
// TODO: PHOTOS panel needs to be the last one since it currently contains PayoutDetailsForm modal
// All the other panels can be reordered.
export const TABS = [DESCRIPTION, FEATURES, POLICY, LOCATION, PRICING, AVAILABILITY, PHOTOS];
export const TABS = [
DESCRIPTION,
FEATURES,
POLICY,
LOCATION,
PRICING,
...availabilityMaybe,
PHOTOS,
];
// Tabs are horizontal in small screens
const MAX_HORIZONTAL_NAV_SCREEN_WIDTH = 1023;