feat(testimonials): remove mock testimonials and add empty state note

This commit is contained in:
ssbg04 committed 2026-09-05 10:59:36 +08:00
1 parent 92cff2878e
commit 020221349e
3 files changed
+55 -33

No files matched your search

+50 -1
View File
@@ -8,7 +8,56 @@ interface TestimonialsProps {
export default function Testimonials({ testimonials }: TestimonialsProps) {
if (!testimonials || testimonials.length === 0) {
return null;
return (
<section id="testimonials" className="py-20 relative overflow-hidden">
<div className="max-w-6xl mx-auto px-4 sm:px-6 relative z-10">
{/* Section Header */}
<ScrollReveal variant="fade-up" className="mb-10">
<div className="flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-4 border-b border-border-custom">
<div>
<span className="section-tag">
<span className="w-1.5 h-1.5 rounded-full bg-primary-custom" />
05 // Endorsements
</span>
<h2 className="text-3xl sm:text-4xl font-bold font-heading text-foreground-custom mt-1 tracking-tight">
Client &amp; Peer Testimonials
</h2>
</div>
<p className="text-sm text-muted-foreground-custom">
Recommendations, supervisor reviews &amp; colleague feedback.
</p>
</div>
</ScrollReveal>
{/* Empty Note Card */}
<ScrollReveal variant="fade-up" delay={100}>
<div className="bento-card p-8 sm:p-12 text-center border border-border-custom max-w-xl mx-auto flex flex-col items-center justify-center">
<div className="w-12 h-12 rounded-2xl bg-primary-custom/10 border border-primary-custom/20 text-primary-custom flex items-center justify-center mb-4 shadow-sm">
<svg className="w-6 h-6" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" />
</svg>
</div>
<h3 className="text-lg font-bold font-heading text-foreground-custom mb-2">
No Testimonials Yet
</h3>
<p className="text-sm text-muted-foreground-custom leading-relaxed mb-6">
Client reviews, supervisor feedback, and project endorsements will be showcased here once published via Sanity Studio.
</p>
<a
href="#contact"
className="inline-flex items-center gap-2 px-4 py-2.5 rounded-xl bg-primary-custom/10 hover:bg-primary-custom/20 border border-primary-custom/30 text-primary-custom text-xs font-mono font-medium transition-all"
>
Work with me &amp; share feedback →
</a>
</div>
</ScrollReveal>
</div>
</section>
);
}
const isCarousel = testimonials.length > 3;
+4 -29
View File
@@ -295,32 +295,7 @@ export const mockEducation: Education[] = [
}
];
export const mockTestimonials: Testimonial[] = [
{
name: "Engr. Michael Reyes",
role: "Department Coordinator",
company: "Talisay Integrated School",
quote: "Cris engineered our records management solution with exceptional precision. His database structure eliminated redundant paperwork and streamlined student profiling across the board.",
relationship: "Internship Supervisor",
rating: 5
},
{
name: "Prof. Alyssa Navarro",
role: "Lead IT Faculty",
company: "LSPU College of Computer Studies",
quote: "One of the most dedicated developers in his cohort. Cris combines strong relational database skills with modern full-stack practices and always goes beyond basic requirements.",
relationship: "Academic Instructor",
rating: 5
},
{
name: "Jethro Hernandez",
role: "Senior Full-Stack Engineer",
company: "Collaborative Project",
quote: "A dependable and proactive teammate. Cris writes clean, modular code, adapts rapidly to modern toolchains, and delivers rock-solid backend endpoints ahead of schedule.",
relationship: "Project Partner",
rating: 5
}
];
export const mockTestimonials: Testimonial[] = [];
export const mockGalleryItems: GalleryItem[] = [
{
@@ -594,9 +569,9 @@ export async function getEducation(): Promise<Education[]> {
export async function getTestimonials(): Promise<Testimonial[]> {
try {
if (!sanityClient) return mockTestimonials;
if (!sanityClient) return [];
const testimonials = await sanityClient.fetch(`*[_type == "testimonial"] | order(coalesce(order, 99) asc)`);
if (!testimonials || testimonials.length === 0) return mockTestimonials;
if (!testimonials || testimonials.length === 0) return [];
return testimonials.map((t: any) => ({
name: t.name,
role: t.role,
@@ -608,7 +583,7 @@ export async function getTestimonials(): Promise<Testimonial[]> {
}));
} catch (error) {
console.error('Error fetching testimonial from Sanity:', error);
return mockTestimonials;
return [];
}
}
+1 -3
View File
@@ -65,9 +65,7 @@ const socialLinks = await getSocialLinks();
<About settings={settings} experience={experience} education={education} client:visible />
{testimonials.length > 0 && (
<Testimonials testimonials={testimonials} client:visible />
)}
<Testimonials testimonials={testimonials} client:visible />
<ContactForm
socialLinks={socialLinks}