diff --git a/customer-spa/src/pages/Account/AccountDetails.tsx b/customer-spa/src/pages/Account/AccountDetails.tsx index 6a34533..bb7c0a6 100644 --- a/customer-spa/src/pages/Account/AccountDetails.tsx +++ b/customer-spa/src/pages/Account/AccountDetails.tsx @@ -1,6 +1,7 @@ import React, { useState, useEffect, useRef } from 'react'; import { toast } from 'sonner'; import { api } from '@/lib/api/client'; +import SEOHead from '@/components/SEOHead'; interface AvatarSettings { allow_custom_avatar: boolean; @@ -198,6 +199,7 @@ export default function AccountDetails() { return (
+

Account Details

{/* Avatar Section */} diff --git a/customer-spa/src/pages/Account/Addresses.tsx b/customer-spa/src/pages/Account/Addresses.tsx index 298b5a8..2ece235 100644 --- a/customer-spa/src/pages/Account/Addresses.tsx +++ b/customer-spa/src/pages/Account/Addresses.tsx @@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'; import { MapPin, Plus, Edit, Trash2, Star } from 'lucide-react'; import { api } from '@/lib/api/client'; import { toast } from 'sonner'; +import SEOHead from '@/components/SEOHead'; interface Address { id: number; @@ -50,10 +51,10 @@ export default function Addresses() { const loadAddresses = async () => { try { const response: any = await api.get('/account/addresses'); - + // Handle different response structures let data: Address[] = []; - + if (Array.isArray(response)) { data = response; } else if (response && typeof response === 'object') { @@ -121,7 +122,7 @@ export default function Addresses() { const handleDelete = async (id: number) => { if (!confirm('Are you sure you want to delete this address?')) return; - + try { await api.delete(`/account/addresses/${id}`); toast.success('Address deleted successfully'); @@ -153,9 +154,10 @@ export default function Addresses() { return (
+

Addresses

-
- + {addresses.length === 0 ? (

No addresses saved yet

-
)} - +

{address.label}

{address.type === 'both' ? 'Billing & Shipping' : address.type}
- +

{address.first_name} {address.last_name}

{address.company &&

{address.company}

} @@ -203,7 +205,7 @@ export default function Addresses() { {address.phone &&

Phone: {address.phone}

} {address.email &&

Email: {address.email}

}
- +
- )} +
+

My Wishlist

+

+ {items.length} {items.length === 1 ? 'item' : 'items'} +

+ {items.length > 0 && ( + + )} +
- {/* Empty State */} - {items.length === 0 ? ( -
- -

Your wishlist is empty

-

- Save your favorite products to buy them later -

- -
- ) : ( - /* Wishlist Grid */ -
- {items.map((item) => ( -
- {/* Image */} -
- - - {item.name} navigate(`/product/${item.slug}`)} - /> - - {item.on_sale && ( -
- SALE -
+ {/* Empty State */} + {items.length === 0 ? ( +
+ +

Your wishlist is empty

+

+ Save your favorite products to buy them later +

+ +
+ ) : ( + /* Wishlist Grid */ +
+ {items.map((item) => ( +
+ {/* Image */} +
+ + + {item.name} navigate(`/product/${item.slug}`)} + /> + + {item.on_sale && ( +
+ SALE +
+ )} +
+ + {/* Content */} +
+

navigate(`/product/${item.slug}`)} + > + {item.name} +

+ + {/* Price */} +
+ {item.on_sale && item.regular_price ? ( + <> + + {formatPrice(item.sale_price || item.price)} + + + {formatPrice(item.regular_price)} + + + ) : ( + + {formatPrice(item.price)} + )}
- {/* Content */} -
-

navigate(`/product/${item.slug}`)} + {/* Actions */} + {(wishlistSettings.show_add_to_cart_button ?? true) && ( +

- - {/* Price */} -
- {item.on_sale && item.regular_price ? ( - <> - - {formatPrice(item.sale_price || item.price)} - - - {formatPrice(item.regular_price)} - - - ) : ( - - {formatPrice(item.price)} - - )} -
- - {/* Actions */} - {(wishlistSettings.show_add_to_cart_button ?? true) && ( - - )} -
+ + )}
- ))} -
- )} +
+ ))} +
+ )}
); } diff --git a/customer-spa/src/pages/Login/index.tsx b/customer-spa/src/pages/Login/index.tsx index 57f690e..ecd2905 100644 --- a/customer-spa/src/pages/Login/index.tsx +++ b/customer-spa/src/pages/Login/index.tsx @@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'; import { useNavigate, useSearchParams, Link } from 'react-router-dom'; import { toast } from 'sonner'; import Container from '@/components/Layout/Container'; +import SEOHead from '@/components/SEOHead'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; @@ -115,6 +116,7 @@ export default function Login() { return ( +
{/* Back link */} diff --git a/customer-spa/src/pages/ThankYou/index.tsx b/customer-spa/src/pages/ThankYou/index.tsx index 0f8e515..d1d1845 100644 --- a/customer-spa/src/pages/ThankYou/index.tsx +++ b/customer-spa/src/pages/ThankYou/index.tsx @@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'; import { useParams, Link, useSearchParams } from 'react-router-dom'; import { useThankYouSettings } from '@/hooks/useAppearanceSettings'; import Container from '@/components/Layout/Container'; +import SEOHead from '@/components/SEOHead'; import { CheckCircle, ShoppingBag, Package, Truck, User, LogIn } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { formatPrice } from '@/lib/currency'; @@ -74,6 +75,7 @@ export default function ThankYou() { if (template === 'receipt') { return (
+
{/* Receipt Container */} @@ -351,6 +353,7 @@ export default function ThankYou() { // Render basic style template (default) return (
+
{/* Success Header */} diff --git a/customer-spa/src/pages/Wishlist.tsx b/customer-spa/src/pages/Wishlist.tsx index 2d17f52..51b3502 100644 --- a/customer-spa/src/pages/Wishlist.tsx +++ b/customer-spa/src/pages/Wishlist.tsx @@ -7,6 +7,7 @@ import { Button } from '@/components/ui/button'; import { toast } from 'sonner'; import { apiClient } from '@/lib/api/client'; import { formatPrice } from '@/lib/currency'; +import SEOHead from '@/components/SEOHead'; interface ProductData { id: number; @@ -106,6 +107,7 @@ export default function Wishlist() { return (
+

My Wishlist