forked from crowetic/commerce
Update ProductView.tsx (#433)
When you navigate to other product page, the options selected by default don't change and the options from the last product navigated are used. Adding a key to "ProductSideBar" component, makes it refresh default options and refresh actual product selected options when i navigate for many products.
This commit is contained in:
parent
e991b54b0e
commit
4b58f6365a
@ -58,7 +58,7 @@ const ProductView: FC<ProductViewProps> = ({ product, relatedProducts }) => {
|
||||
)}
|
||||
</div>
|
||||
|
||||
<ProductSidebar product={product} className={s.sidebar} />
|
||||
<ProductSidebar key={product.id} product={product} className={s.sidebar} />
|
||||
</div>
|
||||
<hr className="mt-7 border-accent-2" />
|
||||
<section className="py-12 px-6 mb-10">
|
||||
|
Loading…
x
Reference in New Issue
Block a user