mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Moved the features to be environment variable only
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user