diff --git a/src/App.js b/src/App.js index 7d4f33b..f73ab32 100644 --- a/src/App.js +++ b/src/App.js @@ -58,16 +58,16 @@ function App() { {/* */} {/* */} {/* */} - {/* */} + {/* */} {/* */} - {/* */} + {/* */} - {/* */} + {/* */} - - - + {/* */} + {/* */} + {/* */} ); diff --git a/src/components/ProductSuggestion/index.js b/src/components/ProductSuggestion/index.js index d30ac47..16add84 100644 --- a/src/components/ProductSuggestion/index.js +++ b/src/components/ProductSuggestion/index.js @@ -19,6 +19,7 @@ const ProductSuggestion = ({ suggestions, selected }) => {
setSelectedProduct(suggestion)} > { {suggestion.productPrice} تومان

-
- {suggestion.selected && ( +
+ {/* {suggestion.selected && ( انتخاب شما + )} */} + {selectedProduct === suggestion && ( + انتخاب شما )} setSelectedProduct(suggestion)} className="checkbox-input mt-4 cursor-pointer w-4 h-4" type="checkbox" @@ -79,28 +84,28 @@ ProductSuggestion.defaultProps = { productTitle: "لپ تاپ گیمینگ ایسوس", productPrice: "750000", plusIcon: null, - selected: true, + // selected: true, }, { productImage: productImg, productTitle: "مانیتور 40 اینچ", productPrice: "3.000.000", plusIcon: plus, - selected: false, + // selected: true, }, { productImage: productImg, productTitle: "ماوس گیمینگ", productPrice: "650/000", plusIcon: plus, - selected: false, + // selected: false, }, { productImage: productImg, productTitle: "لپ تاپ مک بوک پرو 2022", productPrice: "2000", plusIcon: plus, - selected: false, + // selected: false, }, ], };