|
1 | | -import { Player } from '@lottiefiles/react-lottie-player' |
2 | 1 | import { H2, H3 } from '../custom/header' |
3 | | -import { ro } from 'date-fns/locale' |
| 2 | +import { RiDoubleQuotesL } from 'react-icons/ri' |
| 3 | +import testimonials from '@/content/testimonials.json' |
| 4 | + |
| 5 | +type Testimonial = { |
| 6 | + name: string |
| 7 | + role?: string |
| 8 | + organization?: string |
| 9 | + quote: string |
| 10 | + image?: string |
| 11 | + url?: string |
| 12 | +} |
4 | 13 |
|
5 | 14 | export const Testimonials = () => { |
6 | | - const testimonials = [ |
7 | | - { |
8 | | - name: 'Sarah Johnson', |
9 | | - role: 'Data Officer, City Government', |
10 | | - quote: |
11 | | - '"PortalJS Cloud allowed us to launch our open data initiative in days instead of months. The platform is intuitive and our users love the experience."', |
12 | | - image: '/static/img/home/62-100x100.jpg', |
13 | | - style: '', |
14 | | - }, |
15 | | - { |
16 | | - name: 'Dr. Michael Chen', |
17 | | - role: 'Research Director, University', |
18 | | - quote: |
19 | | - '"We needed a compliant, secure solution for sharing research data. PortalJS Cloud met all our requirements and was surprisingly easy to implement."', |
20 | | - image: '/static/img/home/64-100x100.jpg', |
21 | | - style: '', |
22 | | - }, |
23 | | - { |
24 | | - name: 'Emma Rodriguez', |
25 | | - role: 'IT Manager, Non-profit Organization', |
26 | | - quote: |
27 | | - '"The support team has been exceptional. They helped us migrate our legacy data and provided training for our staff. Highly recommended."', |
28 | | - image: '/static/img/home/65-100x100.jpg', |
29 | | - style: '', |
30 | | - }, |
31 | | - ] |
| 15 | + const items = (testimonials as Testimonial[]).filter( |
| 16 | + (t) => t && t.quote && t.name |
| 17 | + ) |
| 18 | + |
| 19 | + if (!items.length) return null |
32 | 20 |
|
33 | 21 | return ( |
34 | | - <div className="py-24"> |
35 | | - <div className=""> |
| 22 | + <div className="pt-10 sm:pt-16 lg:pt-24 pb-24"> |
| 23 | + <div> |
36 | 24 | <H2 className="text-center mb-4"> |
37 | 25 | Trusted by Data Publishers Worldwide |
38 | 26 | </H2> |
39 | | - <H3 className="opacity-75 text-center "> |
40 | | - Join hundreds of organizations that trust PortalJS Cloud for their |
41 | | - data publishing needs. |
| 27 | + <H3 className="opacity-75 text-center"> |
| 28 | + Real feedback from organizations using PortalJS Cloud |
42 | 29 | </H3> |
43 | 30 | <div className="mt-16 grid grid-cols-1 gap-y-12 sm:gap-x-12 lg:grid-cols-3 lg:gap-x-6"> |
44 | | - {testimonials.map((testimonial) => ( |
| 31 | + {items.map((t) => ( |
45 | 32 | <div |
46 | | - key={testimonial.name} |
47 | | - className="relative flex flex-col rounded-xl dark:bg-slate-900 dark:hover:bg-slate-800 hover:bg-slate-100 transition-all duration-300 ring-1 ring-slate-200 dark:ring-slate-800 p-7 gap-7 rounded-lg shadow-lg overflow-hidden" |
| 33 | + key={`${t.name}-${t.quote.slice(0, 16)}`} |
| 34 | + className="relative flex flex-col rounded-xl dark:bg-slate-900 dark:hover:bg-slate-800 hover:bg-slate-100 transition-all duration-300 ring-1 ring-slate-200 dark:ring-slate-800 p-7 gap-5 rounded-lg shadow-lg overflow-hidden" |
48 | 35 | > |
49 | | - <p className=" text-base opacity-75">{testimonial.quote}</p> |
50 | | - <div className="flex-shrink-0 w-full flex items-start gap-4 mt-auto "> |
51 | | - <img |
52 | | - src={testimonial.image} |
53 | | - className={`w-14 h-14 ${testimonial.style} rounded-full`} |
54 | | - /> |
55 | | - <div className=""> |
56 | | - <h3 className="text-lg font-medium ">{testimonial.name}</h3> |
57 | | - <p className="text-sm text-gray-500 dark:text-gray-400"> |
58 | | - {testimonial.role} |
59 | | - </p> |
60 | | - </div> |
| 36 | + <div className="text-theme-orange opacity-75"> |
| 37 | + <RiDoubleQuotesL className="w-6 h-6" aria-hidden /> |
| 38 | + </div> |
| 39 | + <p className="text-base opacity-75">{t.quote}</p> |
| 40 | + <div className="flex-shrink-0 w-full mt-auto"> |
| 41 | + <h3 className="text-lg font-medium "> |
| 42 | + {t.url ? ( |
| 43 | + <a |
| 44 | + href={t.url} |
| 45 | + target="_blank" |
| 46 | + rel="noopener noreferrer" |
| 47 | + className="hover:underline" |
| 48 | + > |
| 49 | + {t.name} |
| 50 | + </a> |
| 51 | + ) : ( |
| 52 | + t.name |
| 53 | + )} |
| 54 | + </h3> |
| 55 | + <p className="text-sm text-gray-500 dark:text-gray-400"> |
| 56 | + {[t.role, t.organization].filter(Boolean).join(', ')} |
| 57 | + </p> |
61 | 58 | </div> |
62 | 59 | </div> |
63 | 60 | ))} |
|
0 commit comments