From 47dc94ec89ee531fc3e9da8873b6b50a5e0bace8 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 13:18:04 +0000 Subject: [PATCH] Changes --- src/components/PlansSection.tsx | 46 +++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/src/components/PlansSection.tsx b/src/components/PlansSection.tsx index 1bd1de0..f09810d 100644 --- a/src/components/PlansSection.tsx +++ b/src/components/PlansSection.tsx @@ -1,9 +1,5 @@ -import { useState, useEffect } from "react"; -import { Check, Loader2 } from "lucide-react"; -import { - Dialog, - DialogContent, -} from "@/components/ui/dialog"; +import { useState } from "react"; +import { Check, Loader2, Crown, Gift } from "lucide-react"; import { useShopifyProducts } from "@/hooks/useShopifyProducts"; import { useCartStore } from "@/stores/cartStore"; import { toast } from "sonner"; @@ -20,6 +16,7 @@ const planDetails = [ "Betala direkt eller med Klarna", ], shopifyHandle: "liten-kakabonnemang-3-kg-vecka", + isPremium: false, }, { name: "Mellan", @@ -32,6 +29,7 @@ const planDetails = [ "Betala direkt eller med Klarna", ], shopifyHandle: "mellan-kakabonnemang-5-kg-vecka", + isPremium: false, }, { name: "Stor", @@ -42,18 +40,21 @@ const planDetails = [ "10 kg kakor per vecka", "Veckoleverans", "Betala direkt eller med Klarna", + "Gratis provlåda vid start", + "Prioriterad kundtjänst", ], shopifyHandle: "stor-kakabonnemang-10-kg-vecka", + isPremium: true, + exclusiveOffer: "Första månaden -20%", }, ]; const PlansSection = () => { const [selectedPlan, setSelectedPlan] = useState(""); - const [dialogOpen, setDialogOpen] = useState(false); const [checkoutLoading, setCheckoutLoading] = useState(false); const { products, isLoading: productsLoading } = useShopifyProducts("product_type:Abonnemang"); - const { addItem, getCheckoutUrl, clearCart, isLoading: cartLoading } = useCartStore(); + const { addItem, clearCart, isLoading: cartLoading } = useCartStore(); const handleSelectPlan = async (plan: typeof planDetails[0]) => { // Find the matching Shopify product @@ -118,16 +119,39 @@ const PlansSection = () => { {planDetails.map((plan, index) => (
+ {/* Premium badge */} + {plan.isPremium && ( +
+
+ + Mest populär + Populär +
+
+ )} + {/* Plan header */} -
-

+
+

{plan.name}

{plan.employeeRecommendation}

+ + {/* Exclusive offer badge */} + {plan.isPremium && plan.exclusiveOffer && ( +
+ + {plan.exclusiveOffer} +
+ )}
{/* Price info */}