diff --git a/next.config.mjs b/next.config.mjs index bce6497..d50233e 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -14,6 +14,18 @@ const nextConfig = { port: '', pathname: '/**', }, + { + protocol: 'https', + hostname: 'backend.parsaaghayi.ir', + port: '', + pathname: '/**', + }, + { + protocol: 'https', + hostname: 'parsaaghayi.ir', + port: '', + pathname: '/**', + }, ], }, async rewrites() { diff --git a/src/app/(routes)/(website)/components/contact/contact.tsx b/src/app/(routes)/(website)/components/contact/contact.tsx index e79d795..77fd05b 100644 --- a/src/app/(routes)/(website)/components/contact/contact.tsx +++ b/src/app/(routes)/(website)/components/contact/contact.tsx @@ -82,7 +82,7 @@ export default function Contact({ dict }: ContactProps) { whileTap={{ scale: 0.98 }} disabled={isSubmitting} type="submit" - className="relative w-full md:w-auto flex items-center justify-center gap-2 px-8 py-4 rounded-2xl bg-primary text-primary-foreground font-bold transition-all duration-300 disabled:opacity-70 disabled:cursor-not-allowed" + className="relative w-full md:w-auto flex items-center justify-center gap-2 px-8 py-4 rounded-2xl bg-primary text-primary-foreground font-bold whitespace-nowrap transition-all duration-300 disabled:opacity-70 disabled:cursor-not-allowed" > {isSubmitting ? (
diff --git a/src/app/(routes)/(website)/components/footer/footer.tsx b/src/app/(routes)/(website)/components/footer/footer.tsx index 9c896a5..3d1343e 100644 --- a/src/app/(routes)/(website)/components/footer/footer.tsx +++ b/src/app/(routes)/(website)/components/footer/footer.tsx @@ -54,14 +54,14 @@ export default async function Footer() { {social.alt} ))} diff --git a/src/app/(routes)/(website)/components/header/header.tsx b/src/app/(routes)/(website)/components/header/header.tsx index 76739a9..9759799 100644 --- a/src/app/(routes)/(website)/components/header/header.tsx +++ b/src/app/(routes)/(website)/components/header/header.tsx @@ -41,10 +41,10 @@ export default function Header() { return (
diff --git a/src/app/(routes)/(website)/components/testimonials/testimonials.tsx b/src/app/(routes)/(website)/components/testimonials/testimonials.tsx index d25112e..5a546cb 100644 --- a/src/app/(routes)/(website)/components/testimonials/testimonials.tsx +++ b/src/app/(routes)/(website)/components/testimonials/testimonials.tsx @@ -1,70 +1,34 @@ "use client"; -import { Testimonial } from "@/app/types/types"; import React, { useState, useRef, useEffect } from "react"; import { motion } from "framer-motion"; import { Quote, ChevronLeft, ChevronRight } from "lucide-react"; import Image from "next/image"; import { getCookie } from "cookies-next"; +interface TestimonialData { + name: string; + position: string; + image: string; + quote: string; +} + +interface TestimonialsDict { + title: string; + description: string; + data: TestimonialData[]; +} + interface TestimonialsProps { dict: { website: { homePage: { - testimonials: { - title: string; - description: string; - }; + testimonials: TestimonialsDict; }; }; }; } -const testimonials: Testimonial[] = [ - { - name: "Sarah Johnson", - position: "Founder & CEO of Innovate Solutions", - image: "/images/user-1.svg", - quote: - 'The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.', - }, - { - name: "Michael Lee", - position: "Chief Executive Officer at Tech Innovators", - image: "/images/user-1.svg", - quote: - "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.", - }, - { - name: "Emma Davis", - position: "CEO & Lead Strategist at Visionary Ventures", - image: "/images/user-1.svg", - quote: - "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.", - }, - { - name: "John Doe", - position: "COO at Startup Labs", - image: "/images/user-1.svg", - quote: - "All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet.", - }, - { - name: "Jane Smith", - position: "Founder at Health Innovations", - image: "/images/user-1.svg", - quote: - "It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.", - }, - { - name: "Alex Chen", - position: "CTO at CloudBase Technologies", - image: "/images/user-1.svg", - quote: - "Working with this developer was an absolute pleasure. The attention to detail, code quality, and timely delivery exceeded our expectations. I highly recommend their services for any complex web development project.", - }, -]; - export default function Testimonials({ dict }: TestimonialsProps) { const [currentIndex, setCurrentIndex] = useState(0); const scrollRef = useRef(null); @@ -77,7 +41,8 @@ export default function Testimonials({ dict }: TestimonialsProps) { }, []); const isRTL = locale === "fa"; - const maxIndex = Math.max(0, testimonials.length - 3); + const tData = dict.website.homePage.testimonials.data || []; + const maxIndex = Math.max(0, tData.length - 3); const scrollTo = (index: number) => { const idx = Math.max(0, Math.min(index, maxIndex)); @@ -120,7 +85,7 @@ export default function Testimonials({ dict }: TestimonialsProps) { className="flex gap-8 overflow-x-auto snap-x snap-mandatory scrollbar-none pb-4" style={{ scrollbarWidth: "none", msOverflowStyle: "none" }} > - {testimonials.map((testimonial, index) => ( + {tData.map((testimonial, index) => (
-

+

"{testimonial.quote}"

@@ -169,7 +134,7 @@ export default function Testimonials({ dict }: TestimonialsProps) { ))}
- {testimonials.length > 3 && ( + {tData.length > 3 && ( <>