translation bug fixed

This commit is contained in:
nabijonovdavronbek619@gmail.com
2025-11-29 13:48:55 +05:00
parent ca8369cc31
commit aa2260f212
28 changed files with 1521 additions and 242 deletions

View File

@@ -4,24 +4,16 @@ import { useState, useEffect } from "react";
import Image from "next/image";
import { motion, AnimatePresence } from "framer-motion";
import { ChevronLeft, ChevronRight } from "lucide-react";
import { useTranslations } from "next-intl";
import { useLanguage } from "@/context/language-context";
//hello again dear
interface ShowCaseProps {
titleKey: string;
subtitleKey?: string;
ctaLabelKey: string;
images: string[];
}
export function ShowCase({
titleKey,
subtitleKey,
ctaLabelKey,
images,
}: ShowCaseProps) {
const t = useTranslations();
export function ShowCase({ images }: ShowCaseProps) {
const { t } = useLanguage();
const [currentImageIndex, setCurrentImageIndex] = useState(0);
const [autoPlay, setAutoPlay] = useState(true);
@@ -54,7 +46,6 @@ export function ShowCase({
return (
<section className="relative min-h-screen pt-20 pb-20">
{/* background image */}
<div className="absolute -z-50 top-0 left-0 h-full w-full">
<Image
@@ -76,14 +67,11 @@ export function ShowCase({
className="bg-white/80 backdrop-blur-md rounded-xl overflow-hidden p-4"
>
<h1 className="text-4xl lg:text-5xl font-bold text-gray-900 mb-6 leading-tight">
{t(titleKey)}
{t.hero.title}
</h1>
{subtitleKey && (
<p className="text-lg text-gray-600 mb-8 leading-relaxed">
{t(subtitleKey)}
</p>
)}
<p className="text-lg text-gray-600 mb-8 leading-relaxed">
{t.hero.subtitle}
</p>
<motion.button
whileHover={{ scale: 1.05 }}
@@ -91,7 +79,7 @@ export function ShowCase({
onClick={handleContactClick}
className="px-8 py-3 bg-linear-to-r from-blue-600 to-blue-700 text-white rounded-lg font-semibold hover:shadow-lg transition-shadow"
>
{t(ctaLabelKey)}
{t.hero.cta}
</motion.button>
</motion.div>
@@ -102,7 +90,7 @@ export function ShowCase({
transition={{ duration: 0.6, delay: 0.2 }}
className="relative"
>
<div className="relative aspect-square rounded-xl overflow-hidden shadow-2xl bg-gray-100">
<div className="relative aspect-square rounded-xl overflow-hidden">
<AnimatePresence mode="wait">
<motion.div
key={currentImageIndex}