"use client"; import { Section } from "@/components/ui/Section"; import { Heading, Text } from "@/components/ui/Typography"; import { useTranslation } from "@/lib/hooks/useTranslation"; import { container } from "@/lib/utils"; // Define the review data structure interface Review { id: number; author: string; comment: string; } export function CustomerReviews() { const { t, locale } = useTranslation(); // Definiraj reviewse po jeziku const reviews: Review[] = locale === 'en' ? [ { id: 1, author: "Emily Johnson", comment: "\"The Build a Box feature made gift-giving so easy and special!\"" }, { id: 2, author: "Michael Smith", comment: "\"Sent's service exceeded my expectations every time!\"" }, { id: 3, author: "Sarah Lee", comment: "\"The quality of the items was outstanding!\"" } ] : [ { id: 1, author: "Ana Kovačić", comment: "\"Opcija 'Složi kutiju' učinila je darivanje tako jednostavnim i posebnim!\"" }, { id: 2, author: "Marko Horvat", comment: "\"Usluga Sent-a nadmašila je moja očekivanja svaki put!\"" }, { id: 3, author: "Ivana Novak", comment: "\"Kvaliteta proizvoda bila je izvanredna!\"" } ]; return (
{/* Keep the heading inside container */}
{t('customerReviews.title')} {/* Mobile: Full width scrollable container, Desktop: Grid */}
{/* Add empty div at start to ensure space */}
{reviews.map((review) => (
{review.comment}
{review.author}
))} {/* Add empty div at end to ensure space */}
{/* Desktop: Original grid layout */}
{reviews.map((review) => (
{review.comment}
{review.author}
))}
); }