From b8a0bb5a21029cc037a8af228d1406226ee311b6 Mon Sep 17 00:00:00 2001 From: okbel Date: Fri, 29 Jan 2021 11:22:41 -0300 Subject: [PATCH] Progress --- CHANGELOG.md | 5 +++-- components/product/ProductView/ProductView.tsx | 5 ++--- .../wishlist/WishlistButton/WishlistButton.tsx | 6 +++--- tsconfig.json | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d1d95638..b21b673f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## Changelog -- Select Variants Working -- Click on cart item title, closes the sidebar +- Select Variants Fully Working +- Click on the Cart Item Title, closes the sidebar. + diff --git a/components/product/ProductView/ProductView.tsx b/components/product/ProductView/ProductView.tsx index d3d11ea16..448dfb10a 100644 --- a/components/product/ProductView/ProductView.tsx +++ b/components/product/ProductView/ProductView.tsx @@ -4,9 +4,8 @@ import { NextSeo } from 'next-seo' import { FC, useState } from 'react' import s from './ProductView.module.css' -import { useUI } from '@components/ui' import { Swatch, ProductSlider } from '@components/product' -import { Button, Container, Text } from '@components/ui' +import { Button, Container, Text, useUI} from '@components/ui' import usePrice from '@framework/product/use-price' import { useAddItem } from '@framework/cart' @@ -100,8 +99,8 @@ const ProductView: FC = ({ product }) => { ))} - +
{product.options?.map((opt) => ( diff --git a/components/wishlist/WishlistButton/WishlistButton.tsx b/components/wishlist/WishlistButton/WishlistButton.tsx index dced18a89..19ae3ec1a 100644 --- a/components/wishlist/WishlistButton/WishlistButton.tsx +++ b/components/wishlist/WishlistButton/WishlistButton.tsx @@ -1,12 +1,12 @@ import React, { FC, useState } from 'react' import cn from 'classnames' -import { Heart } from '@components/icons' import { useUI } from '@components/ui' -import useCustomer from '@framework/customer/use-customer' +import { Heart } from '@components/icons' import useAddItem from '@framework/wishlist/use-add-item' +import useWishlist from '@framework/wishlist/use-wishlist' +import useCustomer from '@framework/customer/use-customer' import useRemoveItem from '@framework/wishlist/use-remove-item' -import useWishlist from '@framework/wishlist/use-add-item' type Props = { productId: Product['id'] diff --git a/tsconfig.json b/tsconfig.json index 67de1ee36..480622bb4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,16 +16,16 @@ "jsx": "preserve", "paths": { "@lib/*": ["lib/*"], - "@assets/*": ["assets/*"], - "@config/*": ["config/*"], - "@components/*": ["components/*"], "@utils/*": ["utils/*"], - "@commerce/*": ["framework/commerce/*"], + "@config/*": ["config/*"], + "@assets/*": ["assets/*"], + "@components/*": ["components/*"], "@commerce": ["framework/commerce"], - "@framework/*": ["framework/bigcommerce/*"], + "@commerce/*": ["framework/commerce/*"], "@framework": ["framework/bigcommerce"] + "@framework/*": ["framework/bigcommerce/*"], } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"], - "exclude": ["node_modules", "components/wishlist"] + "exclude": ["node_modules"] }