import type { Metadata } from 'next'; import Link from 'next/link'; import { ReviewStars } from '@/app/components/ReviewStars'; import { reviewPhotoUrl } from '@/app/lib/reviews'; import { commerceDb } from '@/app/lib/commerce-db'; export const dynamic = 'force-dynamic'; export const metadata: Metadata = { title: 'Customer Reviews', description: 'Read reviews and see photos shared by Lumen & Gesso portrait customers.', alternates: { canonical: '/reviews' }, }; export default async function ReviewsPage() { const { data, error } = await commerceDb().from('order_reviews') .select('id,rating,comment,display_name,photo_path') .eq('status', 'approved').order('published_at', { ascending: false }).limit(60); if (error) console.error('[public reviews] could not load', { code: error.code }); return (

Customer reviews

See what customers thought of their portraits and the photos they’ve shared.

Review your portrait {error ?

Reviews are temporarily unavailable.

: data?.length ? (
{data.map(review => (

{review.comment}

{review.display_name || 'Verified customer'}

{review.photo_path && ( /* eslint-disable-next-line @next/next/no-img-element */ Photo shared with this review )}
))}
) :

No reviews have been published yet.

}
); }