diff --git a/src/pages/Account.tsx b/src/pages/Account.tsx index 3a7ea9b..86fb260 100644 --- a/src/pages/Account.tsx +++ b/src/pages/Account.tsx @@ -8,7 +8,8 @@ import { useAuth } from "@/hooks/useAuth"; import { useToast } from "@/hooks/use-toast"; import { supabase } from "@/integrations/supabase/client"; import Header from "@/components/Header"; -import { Save } from "lucide-react"; +import { Save, Package } from "lucide-react"; +import { useShopifyProducts } from "@/hooks/useShopifyProducts"; const profileSchema = z.object({ street_address: z.string().trim().max(200, { message: "Gatuadress får max vara 200 tecken" }).optional(), @@ -38,6 +39,7 @@ const Account = () => { const { user, loading: authLoading, signOut } = useAuth(); const { toast } = useToast(); const navigate = useNavigate(); + const { products, isLoading: productsLoading } = useShopifyProducts("product_type:Abonnemang"); const hasChanges = profile.street_address !== originalProfile.street_address || @@ -239,7 +241,38 @@ const Account = () => { - {/* Sign out link */} + {/* Subscription Section */} +
+
+ +

Mitt abonnemang

+
+ + {productsLoading ? ( +

Laddar abonnemang...

+ ) : ( +
+

+ Du har för närvarande inget aktivt abonnemang. +

+ +
+ )} +