x
This commit is contained in:
1 parent
3cacaacbeb
commit
8b73b8dd2f
52 files changed
+265
-265
No files matched your search
@@ -96,7 +96,7 @@ export default function ProductReviews({ productId }: { productId: number }) {
|
||||
{/* List & Form */}
|
||||
<div className="w-full md:w-2/3 space-y-8">
|
||||
{customer ? (
|
||||
<form onSubmit={handleSubmit} className="bg-white p-6 rounded-3xl border border-spa-stone/10 shadow-sm space-y-4">
|
||||
<form onSubmit={handleSubmit} className="bg-spa-light p-6 rounded-3xl border border-spa-stone/10 shadow-sm space-y-4">
|
||||
<h3 className="font-bold text-pop-black">Write a Review</h3>
|
||||
<div className="flex gap-2">
|
||||
{[1, 2, 3, 4, 5].map(star => (
|
||||
@@ -115,7 +115,7 @@ export default function ProductReviews({ productId }: { productId: number }) {
|
||||
<button
|
||||
type="submit"
|
||||
disabled={submitting}
|
||||
className="px-6 py-2.5 bg-spa-forest text-white text-sm font-bold tracking-widest uppercase rounded-full hover:bg-spa-stone transition-all disabled:opacity-50"
|
||||
className="px-6 py-2.5 bg-spa-forest text-spa-light text-sm font-bold tracking-widest uppercase rounded-full hover:bg-spa-stone transition-all disabled:opacity-50"
|
||||
>
|
||||
{submitting ? 'Submitting...' : 'Submit Review'}
|
||||
</button>
|
||||
@@ -135,8 +135,8 @@ export default function ProductReviews({ productId }: { productId: number }) {
|
||||
onClick={() => { setFilterRating(null); setVisibleCount(3); }}
|
||||
className={`flex-shrink-0 px-4 py-1.5 rounded-full text-xs font-bold transition-all border ${
|
||||
filterRating === null
|
||||
? 'bg-spa-stone text-white border-spa-stone'
|
||||
: 'bg-white text-spa-stone border-spa-stone/20 hover:border-spa-stone/50'
|
||||
? 'bg-spa-stone text-spa-light border-spa-stone'
|
||||
: 'bg-spa-light text-spa-stone border-spa-stone/20 hover:border-spa-stone/50'
|
||||
}`}
|
||||
>
|
||||
All ({reviews.length})
|
||||
@@ -150,11 +150,11 @@ export default function ProductReviews({ productId }: { productId: number }) {
|
||||
onClick={() => { setFilterRating(star); setVisibleCount(3); }}
|
||||
className={`flex-shrink-0 flex items-center gap-1 px-4 py-1.5 rounded-full text-xs font-bold transition-all border ${
|
||||
filterRating === star
|
||||
? 'bg-spa-stone text-white border-spa-stone'
|
||||
: 'bg-white text-spa-stone border-spa-stone/20 hover:border-spa-stone/50'
|
||||
? 'bg-spa-stone text-spa-light border-spa-stone'
|
||||
: 'bg-spa-light text-spa-stone border-spa-stone/20 hover:border-spa-stone/50'
|
||||
}`}
|
||||
>
|
||||
{star} <Star className={`w-3 h-3 ${filterRating === star ? 'fill-white text-white' : 'fill-orange-400 text-orange-400'}`} /> ({count})
|
||||
{star} <Star className={`w-3 h-3 ${filterRating === star ? 'fill-white text-spa-light' : 'fill-orange-400 text-orange-400'}`} /> ({count})
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
@@ -174,7 +174,7 @@ export default function ProductReviews({ productId }: { productId: number }) {
|
||||
{review.customer?.pictureUrl ? (
|
||||
<img src={review.customer.pictureUrl} className="w-10 h-10 rounded-full object-cover" />
|
||||
) : (
|
||||
<div className="w-10 h-10 rounded-full bg-spa-stone/20 flex items-center justify-center text-white font-bold">
|
||||
<div className="w-10 h-10 rounded-full bg-spa-stone/20 flex items-center justify-center text-spa-light font-bold">
|
||||
{(review.customerName || 'A')[0].toUpperCase()}
|
||||
</div>
|
||||
)}
|
||||
@@ -197,7 +197,7 @@ export default function ProductReviews({ productId }: { productId: number }) {
|
||||
<div className="text-center pt-4">
|
||||
<button
|
||||
onClick={() => setVisibleCount(prev => prev + 5)}
|
||||
className="px-6 py-2.5 border border-spa-stone/20 text-spa-stone text-xs font-bold tracking-widest uppercase rounded-full hover:border-spa-stone hover:text-pop-black transition-all bg-white"
|
||||
className="px-6 py-2.5 border border-spa-stone/20 text-spa-stone text-xs font-bold tracking-widest uppercase rounded-full hover:border-spa-stone hover:text-pop-black transition-all bg-spa-light"
|
||||
>
|
||||
Show More Reviews
|
||||
</button>
|
||||
|
||||
Reference in new issue
Block a user