hey-pharmacist-ecommerce 1.1.34 → 1.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hey-pharmacist-ecommerce",
3
- "version": "1.1.34",
3
+ "version": "1.1.35",
4
4
  "description": "Production-ready, multi-tenant e‑commerce UI + API adapter for Next.js with auth, carts, checkout, orders, theming, and pharmacist-focused UX.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -102,7 +102,7 @@ export function AccountOrdersTab() {
102
102
  <div key={item.productVariantId || index} className="flex items-center gap-3">
103
103
  <div className="relative w-12 h-12 rounded-lg bg-slate-100 shrink-0 overflow-hidden">
104
104
  <Image
105
- src={item?.productVariantData?.media?.[0]?.file || '/placeholder-product.jpg'}
105
+ src={item?.productVariantData?.media?.[0]?.file || '/placeholder-product.png'}
106
106
  alt={item?.productVariantData?.name || 'Product image'}
107
107
  fill
108
108
  className="object-cover"
@@ -55,7 +55,7 @@ export function CartItem({ item }: CartItemProps) {
55
55
  {/* Product Image */}
56
56
  <div className="w-28 h-28 rounded-[16px] overflow-hidden bg-gray-50 shrink-0">
57
57
  <Image
58
- src={item.productVariantData.media[0]?.file || '/placeholder-product.jpg'}
58
+ src={item.productVariantData.media[0]?.file || '/placeholder-product.png'}
59
59
  alt={item.productVariantData.name}
60
60
  className="w-full h-full object-cover"
61
61
  height={112}
@@ -106,7 +106,7 @@ export function OrderCard({ order, onDelete }: OrderCardProps) {
106
106
  <div key={item.productVariantId || item._id} className="flex items-center gap-2 text-sm">
107
107
  <div className="relative w-12 h-12 rounded-sm bg-gray-100 shrink-0 overflow-hidden">
108
108
  <Image
109
- src={item?.productVariantData?.media?.[0]?.file || '/placeholder-product.jpg'}
109
+ src={item?.productVariantData?.media?.[0]?.file || '/placeholder-product.png'}
110
110
  alt={item?.productVariantData?.name || 'Product image'}
111
111
  fill
112
112
  className="object-cover"
@@ -158,7 +158,7 @@ export function ProductCard({
158
158
  }, [selectedVariant, product.variants]);
159
159
 
160
160
  const imageSource = useMemo(() => {
161
- const src = selectedVariantImage || selectedVariant?.media?.[0]?.file || product.media?.[0]?.file || '/placeholder-product.jpg';
161
+ const src = selectedVariantImage || selectedVariant?.media?.[0]?.file || product.media?.[0]?.file || '/placeholder-product.png';
162
162
  return {
163
163
  src,
164
164
  alt: product.name || 'Product image'
@@ -868,7 +868,7 @@ export function CheckoutScreen() {
868
868
  {/* Provider Logo */}
869
869
  <div className="shrink-0">
870
870
  <Image
871
- src={rate.providerImage75 || '/placeholder-product.jpg'}
871
+ src={rate.providerImage75 || '/placeholder-product.png'}
872
872
  alt={rate.provider}
873
873
  className="w-12 h-12 rounded-lg object-contain bg-white border border-gray-200 p-1"
874
874
  onError={(e: any) => {
@@ -987,7 +987,7 @@ export function CheckoutScreen() {
987
987
  {cart?.cartBody?.items?.map((item: any) => (
988
988
  <div key={item.productVariantId || item.id} className="flex gap-3">
989
989
  <div className="w-16 h-16 rounded-xl overflow-hidden bg-white shrink-0">
990
- <Image src={item.productVariantData?.media?.[0]?.file || '/placeholder-product.jpg'} alt={item.productVariantData.name} className="w-full h-full object-cover" height={200} width={200} />
990
+ <Image src={item.productVariantData?.media?.[0]?.file || '/placeholder-product.png'} alt={item.productVariantData.name} className="w-full h-full object-cover" height={200} width={200} />
991
991
  </div>
992
992
  <div className="flex-1 min-w-0">
993
993
  <p className="font-['Poppins',sans-serif] font-medium text-[12px] text-[#2B4B7C] mb-1">
@@ -145,7 +145,7 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
145
145
  <div key={item._id || idx} className="p-6 flex gap-6 group hover:bg-slate-50/50 transition-colors">
146
146
  <div className="relative w-20 h-20 bg-slate-100 rounded-2xl overflow-hidden shrink-0 border border-slate-100 group-hover:scale-105 transition-transform duration-300">
147
147
  <Image
148
- src={item.productVariantData?.media?.[0]?.file || '/placeholder-product.jpg'}
148
+ src={item.productVariantData?.media?.[0]?.file || '/placeholder-product.png'}
149
149
  alt={item.productVariantData?.name || 'Item'}
150
150
  fill
151
151
  className="object-cover"
@@ -555,7 +555,7 @@ export function ProductDetailScreen({ productId }: ProductDetailScreenProps) {
555
555
  const variantImage = variant.media?.[0]?.file
556
556
  || product.media?.[0]?.file
557
557
  || product.images?.[0]
558
- || '/placeholder-product.jpg';
558
+ || '/placeholder-product.png';
559
559
  return (
560
560
  <button
561
561
  key={variant._id}
@@ -19,7 +19,6 @@ import { getInitials } from '@/lib/utils/format';
19
19
  import { TabNavigation } from '@/components/TabNavigation';
20
20
  import { AccountOverviewTab } from '@/components/AccountOverviewTab';
21
21
  import { AccountOrdersTab } from '@/components/AccountOrdersTab';
22
- import { AccountSavedItemsTab } from '@/components/AccountSavedItemsTab';
23
22
  import { AccountPaymentTab } from '@/components/AccountPaymentTab';
24
23
  import { AccountAddressesTab } from '@/components/AccountAddressesTab';
25
24
  import { AccountSettingsTab } from '@/components/AccountSettingsTab';
@@ -29,7 +28,6 @@ const tabs = [
29
28
  { id: 'overview', label: 'Overview', icon: User },
30
29
  { id: 'orders', label: 'Orders', icon: Package },
31
30
  { id: 'reviews', label: 'My Reviews', icon: Star },
32
- { id: 'saved-items', label: 'Saved Items', icon: Heart },
33
31
  // { id: 'payment', label: 'Payment', icon: CreditCard },
34
32
  { id: 'addresses', label: 'Addresses', icon: MapPin },
35
33
  { id: 'settings', label: 'Settings', icon: Settings },
@@ -80,8 +78,8 @@ export default function AccountPage() {
80
78
  return <AccountOrdersTab />;
81
79
  case 'reviews':
82
80
  return <AccountReviewsTab />;
83
- case 'saved-items':
84
- return <AccountSavedItemsTab />;
81
+ // case 'saved-items':
82
+ // return <AccountSavedItemsTab />;
85
83
  // case 'payment':
86
84
  // return <AccountPaymentTab />;
87
85
  case 'addresses':
@@ -1126,7 +1126,7 @@ export function ShopScreen({ initialFilters = {}, categoryName }: ShopScreenProp
1126
1126
  >
1127
1127
  <div className="relative h-48 w-full overflow-hidden rounded-2xl bg-gray-100 md:h-40 md:w-40">
1128
1128
  <Image
1129
- src={product.media?.[0]?.file || '/placeholder-product.jpg'}
1129
+ src={product.media?.[0]?.file || '/placeholder-product.png'}
1130
1130
  alt={product.name}
1131
1131
  fill
1132
1132
  className="object-cover transition duration-500 group-hover:scale-105"
@@ -347,7 +347,7 @@ export default function WishlistScreen() {
347
347
  <div className="relative h-28 w-full overflow-hidden rounded-2xl bg-white sm:w-40">
348
348
  <Image
349
349
  fill
350
- src={product.media?.[0]?.file || '/placeholder-product.jpg'}
350
+ src={product.media?.[0]?.file || '/placeholder-product.png'}
351
351
  alt={product.name || 'Wishlist item'}
352
352
  className="h-full w-full object-cover"
353
353
  />
@@ -1,75 +0,0 @@
1
- 'use client';
2
-
3
- import React from 'react';
4
- import { Heart, ShoppingCart } from 'lucide-react';
5
- import { useWishlist } from '@/providers/WishlistProvider';
6
- import { useWishlistProducts } from '@/hooks/useWishlistProducts';
7
- import { ProductCard } from './ProductCard';
8
- import { EmptyState } from './EmptyState';
9
-
10
- export function AccountSavedItemsTab() {
11
- const { products: wishlistProductIds } = useWishlist();
12
-
13
- const { products: wishlistProducts, isLoading, error } = useWishlistProducts(
14
- wishlistProductIds as string[]
15
- );
16
-
17
- const products = wishlistProducts || [];
18
-
19
- if (isLoading) {
20
- return (
21
- <div className="p-6">
22
- <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
23
- {Array.from({ length: 3 }).map((_, index) => (
24
- <div
25
- key={index}
26
- className="h-80 animate-pulse rounded-lg border border-slate-100 bg-slate-50"
27
- />
28
- ))}
29
- </div>
30
- </div>
31
- );
32
- }
33
-
34
- if (error) {
35
- return (
36
- <div className="p-6">
37
- <div className="rounded-lg border border-red-100 bg-red-50 p-6 text-sm text-red-700">
38
- {error.message}
39
- </div>
40
- </div>
41
- );
42
- }
43
-
44
- if (products.length === 0) {
45
- return (
46
- <div className="p-6">
47
- <EmptyState
48
- icon={Heart}
49
- title="No saved items"
50
- description="Items you save will appear here for easy access later."
51
- />
52
- </div>
53
- );
54
- }
55
-
56
- return (
57
- <div className="pb-24 p-6">
58
- <div className="p-6 bg-white rounded-xl">
59
- <div className="mb-4">
60
- <h3 className="text-lg font-semibold text-secondary">
61
- Saved for Later
62
- </h3>
63
- <p className="text-sm text-secondary">
64
- {products.length} {products.length === 1 ? 'item' : 'items'} saved
65
- </p>
66
- </div>
67
- <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
68
- {products.map((product) => (
69
- <ProductCard key={product._id} product={product} />
70
- ))}
71
- </div>
72
- </div>
73
- </div>
74
- );
75
- }