From de64b6d99119362730f8f8d391a5e0cf1702a822 Mon Sep 17 00:00:00 2001 From: okbel Date: Fri, 12 Feb 2021 17:10:17 -0300 Subject: [PATCH] New changes and initial Features API --- components/common/UserNav/UserNav.tsx | 18 +++++++++++------- components/product/ProductCard/ProductCard.tsx | 10 +++++++--- .../wishlist/WishlistButton/WishlistButton.tsx | 2 +- components/wishlist/WishlistButton/index.ts | 1 + components/wishlist/index.ts | 1 + pages/index.tsx | 2 +- pages/orders.tsx | 6 +++--- tsconfig.json | 4 ++-- yarn.lock | 6 +++--- 9 files changed, 30 insertions(+), 20 deletions(-) create mode 100644 components/wishlist/WishlistButton/index.ts diff --git a/components/common/UserNav/UserNav.tsx b/components/common/UserNav/UserNav.tsx index c615c18b1..19151c38b 100644 --- a/components/common/UserNav/UserNav.tsx +++ b/components/common/UserNav/UserNav.tsx @@ -9,6 +9,7 @@ import { useUI } from '@components/ui/context' import DropdownMenu from './DropdownMenu' import s from './UserNav.module.css' import { Avatar } from '@components/common' +import frameworkConfig from '@framework/config.json' interface Props { className?: string @@ -21,6 +22,7 @@ const UserNav: FC = ({ className }) => { const { data: customer } = useCustomer() const { toggleSidebar, closeSidebarIfPresent, openModal } = useUI() const itemsCount = data?.lineItems.reduce(countItem, 0) ?? 0 + const isWishlistEnabled = !!frameworkConfig.features.wishlist return (