diff --git a/customer-spa/src/components/CaptchaWidget.tsx b/customer-spa/src/components/CaptchaWidget.tsx index 9a79bdb..5e989d1 100644 --- a/customer-spa/src/components/CaptchaWidget.tsx +++ b/customer-spa/src/components/CaptchaWidget.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; declare global { interface Window { @@ -118,7 +118,7 @@ export function CaptchaWidget({ provider, siteKey, onToken, action = 'checkout' } } }; - }, [provider, siteKey]); + }, [provider, siteKey, onToken]); // Execute reCAPTCHA when loaded useEffect(() => { diff --git a/customer-spa/src/components/CouponURLHandler.tsx b/customer-spa/src/components/CouponURLHandler.tsx index 2652cc7..df5dfc8 100644 --- a/customer-spa/src/components/CouponURLHandler.tsx +++ b/customer-spa/src/components/CouponURLHandler.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef } from 'react'; +import { useEffect, useRef } from 'react'; import { useSearchParams } from 'react-router-dom'; import { applyCoupon } from '@/lib/cart/api'; import { useCartStore } from '@/lib/cart/store'; diff --git a/customer-spa/src/components/ProductCard.tsx b/customer-spa/src/components/ProductCard.tsx index 28015ac..25f9356 100644 --- a/customer-spa/src/components/ProductCard.tsx +++ b/customer-spa/src/components/ProductCard.tsx @@ -3,7 +3,7 @@ import { Link, useNavigate } from 'react-router-dom'; import { ShoppingCart, Heart } from 'lucide-react'; import { formatPrice, formatDiscount } from '@/lib/currency'; import { Button } from './ui/button'; -import { useLayout } from '@/contexts/ThemeContext'; + import { useShopSettings } from '@/hooks/useAppearanceSettings'; import { useWishlist } from '@/hooks/useWishlist'; import { useModules } from '@/hooks/useModules'; @@ -26,7 +26,6 @@ interface ProductCardProps { export function ProductCard({ product, onAddToCart }: ProductCardProps) { const navigate = useNavigate(); - const { isClassic, isModern, isBoutique, isLaunch } = useLayout(); const { layout, elements, addToCart, saleBadge, isLoading } = useShopSettings(); const { isEnabled: wishlistEnabled, isInWishlist, toggleWishlist } = useWishlist(); const { isEnabled: isModuleEnabled } = useModules(); diff --git a/customer-spa/src/components/SEOHead.tsx b/customer-spa/src/components/SEOHead.tsx index a17fea4..358e351 100644 --- a/customer-spa/src/components/SEOHead.tsx +++ b/customer-spa/src/components/SEOHead.tsx @@ -28,7 +28,6 @@ export function SEOHead({ }: SEOHeadProps) { const config = (window as any).woonoowCustomer; const siteName = config?.siteName || 'Store'; - const siteUrl = config?.siteUrl || ''; const fullTitle = title ? `${title} | ${siteName}` : siteName; const fullUrl = url || (typeof window !== 'undefined' ? window.location.href : ''); diff --git a/customer-spa/src/components/SharedContentLayout.tsx b/customer-spa/src/components/SharedContentLayout.tsx index 76b27a2..b678a0f 100644 --- a/customer-spa/src/components/SharedContentLayout.tsx +++ b/customer-spa/src/components/SharedContentLayout.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { cn } from '@/lib/utils'; -import * as LucideIcons from 'lucide-react'; + interface SharedContentProps { // Content diff --git a/customer-spa/src/components/SubscriptionTimeline.tsx b/customer-spa/src/components/SubscriptionTimeline.tsx index 7aa6513..04b9b50 100644 --- a/customer-spa/src/components/SubscriptionTimeline.tsx +++ b/customer-spa/src/components/SubscriptionTimeline.tsx @@ -24,7 +24,7 @@ const SubscriptionTimeline: React.FC = ({ subscription }) => { }); }; - const isMonth = subscription.billing_period === 'month'; + const _isMonth = subscription.billing_period === 'month'; const intervalLabel = `${subscription.billing_interval} ${subscription.billing_period}${subscription.billing_interval > 1 ? 's' : ''}`; return ( diff --git a/customer-spa/src/components/WooCommerceHooks.tsx b/customer-spa/src/components/WooCommerceHooks.tsx index 4a1b5d0..1224ee7 100644 --- a/customer-spa/src/components/WooCommerceHooks.tsx +++ b/customer-spa/src/components/WooCommerceHooks.tsx @@ -48,7 +48,7 @@ export function WooCommerceHooks({ context, hookName, productId, className }: Wo /** * Hook to get all hooks for a context */ -export function useWooCommerceHooks(context: 'product' | 'shop' | 'cart' | 'checkout', productId?: number) { +function useWooCommerceHooks(context: 'product' | 'shop' | 'cart' | 'checkout', productId?: number) { return useQuery({ queryKey: ['wc-hooks', context, productId], queryFn: async () => { diff --git a/customer-spa/src/components/ui/button.tsx b/customer-spa/src/components/ui/button.tsx index 29dd27f..44d10f1 100644 --- a/customer-spa/src/components/ui/button.tsx +++ b/customer-spa/src/components/ui/button.tsx @@ -35,12 +35,10 @@ const buttonVariants = cva( export interface ButtonProps extends React.ButtonHTMLAttributes, - VariantProps { - asChild?: boolean -} + VariantProps { } const Button = React.forwardRef( - ({ className, variant, size, asChild = false, ...props }, ref) => { + ({ className, variant, size, ...props }, ref) => { // Simplified: always render as button (asChild not supported for now) return (