From 1354435c5996e17320b9089eaa60b0763e1d6d38 Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Mon, 8 Jan 2018 16:15:10 +0200 Subject: [PATCH] Disable example custom attributes by default --- .gitignore | 1 + src/config.js | 8 +++- .../EditListingDescriptionForm.test.js.snap | 46 ------------------- 3 files changed, 8 insertions(+), 47 deletions(-) diff --git a/.gitignore b/.gitignore index 6c96c5cf..8a687143 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ build .DS_Store .env npm-debug.log +/.env.development.local diff --git a/src/config.js b/src/config.js index aeac26c6..aba5d91b 100644 --- a/src/config.js +++ b/src/config.js @@ -228,7 +228,7 @@ const stripeSupportedCountries = [ // }, // }, // } -const customAttributes = { +const exampleCustomAttributes = { category: { select: 'single', // possible values: 'single' (only type supported atm.) type: 'string', @@ -236,6 +236,12 @@ const customAttributes = { }, }; +// To use the example custom attributes, set the +// REACT_APP_USE_EXAMPLE_CUSTOM_ATTRIBUTES variable to `true` in the +// gitignored `.env.development.local` file +const useExampleCustomAttributes = process.env.REACT_APP_USE_EXAMPLE_CUSTOM_ATTRIBUTES === 'true'; +const customAttributes = useExampleCustomAttributes ? exampleCustomAttributes : {}; + // Address information is used in SEO schema for Organization (http://schema.org/PostalAddress) const addressCountry = 'FI'; const addressRegion = 'Helsinki'; diff --git a/src/containers/EditListingDescriptionForm/__snapshots__/EditListingDescriptionForm.test.js.snap b/src/containers/EditListingDescriptionForm/__snapshots__/EditListingDescriptionForm.test.js.snap index 4a7b688e..40e835c7 100644 --- a/src/containers/EditListingDescriptionForm/__snapshots__/EditListingDescriptionForm.test.js.snap +++ b/src/containers/EditListingDescriptionForm/__snapshots__/EditListingDescriptionForm.test.js.snap @@ -54,52 +54,6 @@ exports[`EditListingDescriptionForm matches snapshot 1`] = ` value="" /> -
- - -