diff --git a/components/cart/CartSidebarView/CartSidebarView.tsx b/components/cart/CartSidebarView/CartSidebarView.tsx
index c25bd7c95..5b28fde27 100644
--- a/components/cart/CartSidebarView/CartSidebarView.tsx
+++ b/components/cart/CartSidebarView/CartSidebarView.tsx
@@ -9,7 +9,7 @@ import usePrice from '@framework/product/use-price'
import CartItem from '../CartItem'
import s from './CartSidebarView.module.css'
-const CartSidebarView: FC = () => {
+const CartSidebarView: FC<{ wishlist?: boolean }> = ({ wishlist }) => {
const { closeSidebar } = useUI()
const { data, isLoading, isEmpty } = useCart()
@@ -48,7 +48,7 @@ const CartSidebarView: FC = () => {
-
+
diff --git a/components/common/Layout/Layout.tsx b/components/common/Layout/Layout.tsx
index 204c3a871..7eb235ed7 100644
--- a/components/common/Layout/Layout.tsx
+++ b/components/common/Layout/Layout.tsx
@@ -44,7 +44,11 @@ interface Props {
}
}
-const Layout: FC = ({ children, pageProps }) => {
+const Layout: FC = ({
+ children,
+ pageProps: { commerceFeatures, ...pageProps },
+}) => {
+ console.log(pageProps)
const {
displaySidebar,
displayModal,
@@ -54,11 +58,11 @@ const Layout: FC = ({ children, pageProps }) => {
} = useUI()
const { acceptedCookies, onAcceptCookies } = useAcceptCookies()
const { locale = 'en-US' } = useRouter()
-
+ const isWishlistEnabled = commerceFeatures.wishlist
return (
-
+
{children}
@@ -69,7 +73,7 @@ const Layout: FC
= ({ children, pageProps }) => {
-
+
(
+const Navbar: FC<{ wishlist?: boolean }> = ({ wishlist }) => (
@@ -33,7 +33,7 @@ const Navbar: FC = () => (
-
+
diff --git a/components/common/UserNav/UserNav.tsx b/components/common/UserNav/UserNav.tsx
index ab8021063..5d9d58fff 100644
--- a/components/common/UserNav/UserNav.tsx
+++ b/components/common/UserNav/UserNav.tsx
@@ -9,16 +9,15 @@ import { useUI } from '@components/ui/context'
import DropdownMenu from './DropdownMenu'
import s from './UserNav.module.css'
import { Avatar } from '@components/common'
-import Features from '@commerce/utils/features'
interface Props {
className?: string
+ wishlist?: boolean
}
const countItem = (count: number, item: LineItem) => count + item.quantity
-const isWishlistEnabled = Features.isEnabled('wishlist')
-const UserNav: FC = ({ className }) => {
+const UserNav: FC = ({ className, wishlist = false }) => {
const { data } = useCart()
const { data: customer } = useCustomer()
const { toggleSidebar, closeSidebarIfPresent, openModal } = useUI()
@@ -32,7 +31,7 @@ const UserNav: FC = ({ className }) => {
{itemsCount > 0 && {itemsCount}}
- {isWishlistEnabled && (
+ {wishlist && (