Moved the features to be environment variable only

This commit is contained in:
Luis Alvarez
2021-02-23 11:32:54 -05:00
parent a8607f24cd
commit 67d05ea165
7 changed files with 4 additions and 35 deletions

View File

@@ -26,8 +26,6 @@ const SORT = Object.entries({
'price-desc': 'Price: High to low',
})
import Features from '@commerce/utils/features'
import {
filterQuery,
getCategoryPath,
@@ -43,15 +41,11 @@ export async function getStaticProps({
const config = getConfig({ locale })
const { pages } = await getAllPages({ config, preview })
const { categories, brands } = await getSiteInfo({ config, preview })
const isWishlistEnabled = Features.isEnabled('wishlist')
return {
props: {
pages,
categories,
brands,
commerceFeatures: {
wishlist: isWishlistEnabled,
},
},
}
}
@@ -59,7 +53,6 @@ export async function getStaticProps({
export default function Search({
categories,
brands,
commerceFeatures: { wishlist },
}: InferGetStaticPropsType<typeof getStaticProps>) {
const [activeFilter, setActiveFilter] = useState('')
const [toggleFilter, setToggleFilter] = useState(false)
@@ -359,7 +352,6 @@ export default function Search({
width: 480,
height: 480,
}}
wishlist={wishlist}
/>
))}
</Grid>