Browse Source

Fix price display and hide Physical SIM button

Corrects the price formatting in HomeProduct by swapping minSellPrice and minDisplayPrice usage. Comments out the Physical SIM button in ProductDetailView, leaving only the eSIM option visible.
hieubt 3 weeks ago
parent
commit
053a26d214

+ 2 - 2
EsimLao/esim-vite/src/pages/home/components/HomeProduct.tsx

@@ -125,10 +125,10 @@ const HomeProduct = () => {
                 {p.areaName1}
                 {p.areaName1}
               </h3>
               </h3>
               <p className="text-xs text-slate-400 line-through mb-1">
               <p className="text-xs text-slate-400 line-through mb-1">
-                {p.minSellPrice} {p.curency}
+                {formatNumber(p.minDisplayPrice)} {p.curency}
               </p>
               </p>
               <p className="text-lg md:text-2xl font-black text-[#EE0434]">
               <p className="text-lg md:text-2xl font-black text-[#EE0434]">
-                From {formatNumber(p.minDisplayPrice)} {p.curency}
+                From {formatNumber(p.minSellPrice)} {p.curency}
               </p>
               </p>
             </div>
             </div>
           ))}
           ))}

+ 2 - 2
EsimLao/esim-vite/src/pages/product-detail/ProductDetailView.tsx

@@ -371,7 +371,7 @@ const ProductDetailView: React.FC = () => {
                 >
                 >
                   eSIM
                   eSIM
                 </button>
                 </button>
-                <button
+                {/* <button
                   onClick={() => setSimType("Physical")}
                   onClick={() => setSimType("Physical")}
                   className={`flex-1 py-3 md:py-4 rounded-xl font-black text-sm md:text-2xl transition-all ${
                   className={`flex-1 py-3 md:py-4 rounded-xl font-black text-sm md:text-2xl transition-all ${
                     simType === "Physical"
                     simType === "Physical"
@@ -380,7 +380,7 @@ const ProductDetailView: React.FC = () => {
                   }`}
                   }`}
                 >
                 >
                   Physical SIM
                   Physical SIM
-                </button>
+                </button> */}
               </div>
               </div>
             </div>
             </div>
             <div className="space-y-4">
             <div className="space-y-4">