Remove reviews section from product pages

- Delete Reviews.tsx component
- Remove Reviews from standard product page
- Remove Reviews from made-to-order product page
- Simplify page layout by removing review section

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-18 16:24:28 +01:00
co-authored by Claude Haiku 4.5
parent 74f9db6501
commit 10af792261
4 changed files with 3 additions and 68 deletions
+3 -1
View File
@@ -46,7 +46,9 @@
"Bash(rm -rf .next node_modules/.cache)", "Bash(rm -rf .next node_modules/.cache)",
"Bash(git commit -m 'Fix JSX syntax errors in DesignCanvas - close bracket issues *)", "Bash(git commit -m 'Fix JSX syntax errors in DesignCanvas - close bracket issues *)",
"Bash(rm -rf craft2prints)", "Bash(rm -rf craft2prints)",
"Bash(git commit -m 'Add design approval workflow and per-image dimension tracking *)" "Bash(git commit -m 'Add design approval workflow and per-image dimension tracking *)",
"Bash(git commit -m 'Remove feedback messages to simplify design canvas layout *)",
"Bash(git commit -m 'Remove reviews section from product pages *)"
] ]
} }
} }
-5
View File
@@ -4,7 +4,6 @@ import { prisma } from '@/lib/prisma';
import { toProductDTO } from '@/lib/product'; import { toProductDTO } from '@/lib/product';
import { fetchActivePromotions } from '@/lib/promotions'; import { fetchActivePromotions } from '@/lib/promotions';
import ProductCard from '@/components/ProductCard'; import ProductCard from '@/components/ProductCard';
import Reviews from '@/components/Reviews';
const DesignCanvas = dynamic(() => import('@/components/DesignCanvas'), { ssr: false }); const DesignCanvas = dynamic(() => import('@/components/DesignCanvas'), { ssr: false });
@@ -26,10 +25,6 @@ export default async function ProductDetailPage({ params }: { params: { slug: st
<div className="mx-auto max-w-6xl px-6 py-12"> <div className="mx-auto max-w-6xl px-6 py-12">
<DesignCanvas product={product} /> <DesignCanvas product={product} />
<section className="mt-20 border-t border-line pt-12">
<Reviews />
</section>
{related.length > 0 && ( {related.length > 0 && (
<section className="mt-20 border-t border-line pt-12"> <section className="mt-20 border-t border-line pt-12">
<h2 className="mb-8 font-display text-3xl">You might also like</h2> <h2 className="mb-8 font-display text-3xl">You might also like</h2>
-5
View File
@@ -4,7 +4,6 @@ import { toProductDTO } from '@/lib/product';
import { fetchActivePromotions } from '@/lib/promotions'; import { fetchActivePromotions } from '@/lib/promotions';
import StandardProductView from '@/components/StandardProductView'; import StandardProductView from '@/components/StandardProductView';
import ProductCard from '@/components/ProductCard'; import ProductCard from '@/components/ProductCard';
import Reviews from '@/components/Reviews';
export default async function StandardProductPage({ params }: { params: { slug: string } }) { export default async function StandardProductPage({ params }: { params: { slug: string } }) {
const activePromotions = await fetchActivePromotions(); const activePromotions = await fetchActivePromotions();
@@ -24,10 +23,6 @@ export default async function StandardProductPage({ params }: { params: { slug:
<div className="mx-auto max-w-6xl px-6 py-12"> <div className="mx-auto max-w-6xl px-6 py-12">
<StandardProductView product={product} /> <StandardProductView product={product} />
<section className="mt-20 border-t border-line pt-12">
<Reviews />
</section>
{related.length > 0 && ( {related.length > 0 && (
<section className="mt-20 border-t border-line pt-12"> <section className="mt-20 border-t border-line pt-12">
<h2 className="mb-8 font-display text-3xl">You might also like</h2> <h2 className="mb-8 font-display text-3xl">You might also like</h2>
-57
View File
@@ -1,57 +0,0 @@
// Placeholder reviews so the product page doesn't look empty. Swap this out for
// real review data (its own Prisma model, or a reviews API) once you're ready.
const SAMPLE_REVIEWS = [
{
name: 'Priya S.',
rating: 5,
body: 'The print came out exactly how I designed it. Fabric feels heavier than I expected in a good way.',
},
{
name: 'Marcus T.',
rating: 5,
body: "Uploaded my own logo and it lined up perfectly. Shipping was faster than the estimate too.",
},
{
name: 'Aisha K.',
rating: 4,
body: 'Great quality overall. Wish there were a couple more color options for this one.',
},
];
function Stars({ rating }: { rating: number }) {
return (
<span aria-label={`${rating} out of 5 stars`} className="text-splash-orange">
{'★'.repeat(rating)}
<span className="text-line">{'★'.repeat(5 - rating)}</span>
</span>
);
}
export default function Reviews() {
const average =
Math.round((SAMPLE_REVIEWS.reduce((s, r) => s + r.rating, 0) / SAMPLE_REVIEWS.length) * 10) / 10;
return (
<div>
<div className="flex items-baseline gap-4">
<h2 className="font-display text-3xl">Reviews</h2>
<div className="flex items-center gap-2">
<Stars rating={Math.round(average)} />
<span className="text-sm text-muted">
{average} · {SAMPLE_REVIEWS.length} reviews
</span>
</div>
</div>
<div className="mt-8 grid gap-6 sm:grid-cols-3">
{SAMPLE_REVIEWS.map((r) => (
<div key={r.name} className="border border-line bg-surface p-5">
<Stars rating={r.rating} />
<p className="mt-3 text-sm text-ink">{r.body}</p>
<p className="tag-label mt-4">{r.name}</p>
</div>
))}
</div>
</div>
);
}