text updated
This commit is contained in:
@@ -69,7 +69,7 @@ export function Navbar() {
|
|||||||
href={`/${locale}/faq`}
|
href={`/${locale}/faq`}
|
||||||
className="font-unbounded uppercase text-white text-sm h-full flex items-center font-semibold hover:cursor-pointer hover:text-red-500 transition"
|
className="font-unbounded uppercase text-white text-sm h-full flex items-center font-semibold hover:cursor-pointer hover:text-red-500 transition"
|
||||||
>
|
>
|
||||||
{t("navbar.faq")}
|
{locale === "ru" ? "ФАК" : "FAQ"}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href={`/${locale}/services`}
|
href={`/${locale}/services`}
|
||||||
@@ -187,7 +187,7 @@ export function Navbar() {
|
|||||||
className="font-unbounded uppercase text-white text-base font-semibold hover:text-red-500 transition py-2"
|
className="font-unbounded uppercase text-white text-base font-semibold hover:text-red-500 transition py-2"
|
||||||
onClick={() => setIsMobileMenuOpen(false)}
|
onClick={() => setIsMobileMenuOpen(false)}
|
||||||
>
|
>
|
||||||
{t("navbar.faq")}
|
{locale === "ru" ? "ФАК" : "FAQ"}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href={`/${locale}/services`}
|
href={`/${locale}/services`}
|
||||||
|
|||||||
@@ -19,15 +19,13 @@ export function BannerSlider() {
|
|||||||
const BANNER_DATA = [
|
const BANNER_DATA = [
|
||||||
{
|
{
|
||||||
image: "/images/homeBanner3.png",
|
image: "/images/homeBanner3.png",
|
||||||
title: "YONG'INGA QARSHI HIMOYA",
|
title: t("home.banner.title2"),
|
||||||
description:
|
description: t("home.banner.description"),
|
||||||
"Biz yong‘in xavfsizligi tizimlarini o‘rnatish va sertifikatlangan himoya vositalari savdosi bo‘yicha professional xizmatlar ko‘rsatamiz.",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
image: "/images/homeBanner4.png",
|
image: "/images/homeBanner4.png",
|
||||||
title: "YONG'INGA QARSHI HIMOYA",
|
title: t("home.banner.title2"),
|
||||||
description:
|
description: t("home.banner.description"),
|
||||||
"Biz yong‘in xavfsizligi tizimlarini o‘rnatish va sertifikatlangan himoya vositalari savdosi bo‘yicha professional xizmatlar ko‘rsatamiz.",
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { useCategory } from "@/store/useCategory";
|
|||||||
import { useSubCategory } from "@/store/useSubCategory";
|
import { useSubCategory } from "@/store/useSubCategory";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function Filter() {
|
export default function Filter() {
|
||||||
@@ -18,6 +19,7 @@ export default function Filter() {
|
|||||||
const subCategory = useSubCategory((state) => state.subCategory);
|
const subCategory = useSubCategory((state) => state.subCategory);
|
||||||
const setSubCategory = useSubCategory((state) => state.setSubCategory);
|
const setSubCategory = useSubCategory((state) => state.setSubCategory);
|
||||||
const clearSubCategory = useSubCategory((state) => state.clearSubCategory);
|
const clearSubCategory = useSubCategory((state) => state.clearSubCategory);
|
||||||
|
const t = useTranslations();
|
||||||
|
|
||||||
const [dataExpanded, setDataExpanded] = useState<boolean>(false);
|
const [dataExpanded, setDataExpanded] = useState<boolean>(false);
|
||||||
const [numberExpanded, setNumberExpanded] = useState<boolean>(false);
|
const [numberExpanded, setNumberExpanded] = useState<boolean>(false);
|
||||||
@@ -211,7 +213,7 @@ export default function Filter() {
|
|||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
<p className="text-sm text-gray-300">
|
<p className="text-sm text-gray-300">
|
||||||
SubCategory topilmadi
|
{t("subcategory_not_found")}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -225,7 +227,7 @@ export default function Filter() {
|
|||||||
{visibleSectionData && visibleSectionData.length > 0 && (
|
{visibleSectionData && visibleSectionData.length > 0 && (
|
||||||
<div className="bg-gray-500 rounded-lg w-full">
|
<div className="bg-gray-500 rounded-lg w-full">
|
||||||
<p className="bg-red-500 text-white p-2 font-semibold font-almarai text-lg rounded-t-lg">
|
<p className="bg-red-500 text-white p-2 font-semibold font-almarai text-lg rounded-t-lg">
|
||||||
Bo'lim
|
{t("section")}
|
||||||
</p>
|
</p>
|
||||||
<div className="lg:space-y-3 space-x-6 lg:p-2 p-5 flex lg:flex-col overflow-x-auto lg:overflow-x-hidden items-start justify-start w-full">
|
<div className="lg:space-y-3 space-x-6 lg:p-2 p-5 flex lg:flex-col overflow-x-auto lg:overflow-x-hidden items-start justify-start w-full">
|
||||||
{visibleSectionData.map((item: any) => (
|
{visibleSectionData.map((item: any) => (
|
||||||
|
|||||||
@@ -2,17 +2,18 @@
|
|||||||
|
|
||||||
import { useFilter } from "@/lib/filter-zustand";
|
import { useFilter } from "@/lib/filter-zustand";
|
||||||
import { X } from "lucide-react";
|
import { X } from "lucide-react";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
export default function FilterInfo() {
|
export default function FilterInfo() {
|
||||||
const filtered = useFilter((state) => state.filter);
|
const filtered = useFilter((state) => state.filter);
|
||||||
const resetFilter = useFilter((state) => state.resetFilter);
|
const resetFilter = useFilter((state) => state.resetFilter);
|
||||||
const togleFilter = useFilter((state) => state.toggleFilter);
|
const togleFilter = useFilter((state) => state.toggleFilter);
|
||||||
|
const t = useTranslations();
|
||||||
if (filtered.length === 0) {
|
if (filtered.length === 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className="fixed bottom-13 left-5 z-10 bg-gray-500 p-3 rounded-lg space-y-3 max-w-70 w-full">
|
<div className="fixed bottom-13 left-5 z-10 bg-gray-500 p-3 rounded-lg space-y-3 max-w-70 w-full">
|
||||||
<p className="text-white ">Found: 20</p>
|
|
||||||
<div className="flex gap-1 flex-wrap">
|
<div className="flex gap-1 flex-wrap">
|
||||||
{filtered &&
|
{filtered &&
|
||||||
filtered.map((item) => (
|
filtered.map((item) => (
|
||||||
@@ -28,7 +29,7 @@ export default function FilterInfo() {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<button onClick={resetFilter} className="text-white underline ">
|
<button onClick={resetFilter} className="text-white underline ">
|
||||||
Clear all
|
{t("clear_all")}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,12 +8,14 @@ import "swiper/css/navigation";
|
|||||||
import "swiper/css/pagination";
|
import "swiper/css/pagination";
|
||||||
import "swiper/css/thumbs";
|
import "swiper/css/thumbs";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
const navigationPrevEl = ".custom-swiper-prev";
|
const navigationPrevEl = ".custom-swiper-prev";
|
||||||
const navigationNextEl = ".custom-swiper-next";
|
const navigationNextEl = ".custom-swiper-next";
|
||||||
|
|
||||||
export function SliderComp({ imgs }: { imgs: string[] }) {
|
export function SliderComp({ imgs }: { imgs: string[] }) {
|
||||||
const [thumbsSwiper, setThumbsSwiper] = useState<SwiperType | null>(null);
|
const [thumbsSwiper, setThumbsSwiper] = useState<SwiperType | null>(null);
|
||||||
|
const t = useTranslations();
|
||||||
|
|
||||||
// Agar rasm bo'lmasa
|
// Agar rasm bo'lmasa
|
||||||
if (!imgs || imgs.length === 0) {
|
if (!imgs || imgs.length === 0) {
|
||||||
@@ -33,7 +35,7 @@ export function SliderComp({ imgs }: { imgs: string[] }) {
|
|||||||
d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"
|
d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<p className="text-gray-500">Rasm mavjud emas</p>
|
<p className="text-gray-500">{t("image_not_found")}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -45,7 +47,10 @@ export function SliderComp({ imgs }: { imgs: string[] }) {
|
|||||||
<div className="relative group">
|
<div className="relative group">
|
||||||
<Swiper
|
<Swiper
|
||||||
modules={[Navigation, Pagination, Thumbs]}
|
modules={[Navigation, Pagination, Thumbs]}
|
||||||
thumbs={{ swiper: thumbsSwiper && !thumbsSwiper.destroyed ? thumbsSwiper : null }}
|
thumbs={{
|
||||||
|
swiper:
|
||||||
|
thumbsSwiper && !thumbsSwiper.destroyed ? thumbsSwiper : null,
|
||||||
|
}}
|
||||||
navigation={{
|
navigation={{
|
||||||
prevEl: navigationPrevEl,
|
prevEl: navigationPrevEl,
|
||||||
nextEl: navigationNextEl,
|
nextEl: navigationNextEl,
|
||||||
@@ -79,21 +84,41 @@ export function SliderComp({ imgs }: { imgs: string[] }) {
|
|||||||
<button
|
<button
|
||||||
className={`${navigationPrevEl.replace(
|
className={`${navigationPrevEl.replace(
|
||||||
".",
|
".",
|
||||||
""
|
"",
|
||||||
)} absolute z-10 top-1/2 -translate-y-1/2 left-2 md:left-4 rounded-lg w-10 h-10 md:w-12 md:h-12 bg-red-700/90 hover:bg-red-800 text-white flex items-center justify-center transition opacity-0 group-hover:opacity-100 shadow-lg`}
|
)} absolute z-10 top-1/2 -translate-y-1/2 left-2 md:left-4 rounded-lg w-10 h-10 md:w-12 md:h-12 bg-red-700/90 hover:bg-red-800 text-white flex items-center justify-center transition opacity-0 group-hover:opacity-100 shadow-lg`}
|
||||||
>
|
>
|
||||||
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg
|
||||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 19l-7-7 7-7" />
|
className="w-6 h-6"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
strokeWidth={2}
|
||||||
|
d="M15 19l-7-7 7-7"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
className={`${navigationNextEl.replace(
|
className={`${navigationNextEl.replace(
|
||||||
".",
|
".",
|
||||||
""
|
"",
|
||||||
)} absolute z-10 top-1/2 -translate-y-1/2 right-2 md:right-4 rounded-lg w-10 h-10 md:w-12 md:h-12 bg-red-700/90 hover:bg-red-800 text-white flex items-center justify-center transition opacity-0 group-hover:opacity-100 shadow-lg`}
|
)} absolute z-10 top-1/2 -translate-y-1/2 right-2 md:right-4 rounded-lg w-10 h-10 md:w-12 md:h-12 bg-red-700/90 hover:bg-red-800 text-white flex items-center justify-center transition opacity-0 group-hover:opacity-100 shadow-lg`}
|
||||||
>
|
>
|
||||||
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg
|
||||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
|
className="w-6 h-6"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
strokeWidth={2}
|
||||||
|
d="M9 5l7 7-7 7"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
@@ -130,4 +155,4 @@ export function SliderComp({ imgs }: { imgs: string[] }) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,53 +1,54 @@
|
|||||||
import DotAnimatsiya from "@/components/dot/DotAnimatsiya";
|
import DotAnimatsiya from "@/components/dot/DotAnimatsiya";
|
||||||
import FAQAccordion from "../faq/faqAccardion";
|
import FAQAccordion, { FAQItem } from "../faq/faqAccardion";
|
||||||
import { useTranslations } from "next-intl";
|
import { useLocale, useTranslations } from "next-intl";
|
||||||
|
|
||||||
export function ServiceFaq() {
|
export function ServiceFaq() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
const faqItems = [
|
const locale = useLocale();
|
||||||
{
|
const faqItems: FAQItem[] = [
|
||||||
id: "faq-1",
|
{
|
||||||
question: t("faq.question1.question"),
|
id: 1,
|
||||||
answer: t("faq.question1.answer"),
|
question: t("faq.question1.question"),
|
||||||
},
|
answer: t("faq.question1.answer"),
|
||||||
{
|
},
|
||||||
id: "faq-2",
|
{
|
||||||
question: t("faq.question2.question"),
|
id: 2,
|
||||||
answer: t("faq.question2.answer"),
|
question: t("faq.question2.question"),
|
||||||
},
|
answer: t("faq.question2.answer"),
|
||||||
{
|
},
|
||||||
id: "faq-3",
|
{
|
||||||
question: t("faq.question3.question"),
|
id: 3,
|
||||||
answer: t("faq.question3.answer"),
|
question: t("faq.question3.question"),
|
||||||
},
|
answer: t("faq.question3.answer"),
|
||||||
{
|
},
|
||||||
id: "faq-4",
|
{
|
||||||
question: t("faq.question4.question"),
|
id: 4,
|
||||||
answer: t("faq.question4.answer"),
|
question: t("faq.question4.question"),
|
||||||
},
|
answer: t("faq.question4.answer"),
|
||||||
{
|
},
|
||||||
id: "faq-5",
|
{
|
||||||
question: t("faq.question5.question"),
|
id: 5,
|
||||||
answer: t("faq.question5.answer"),
|
question: t("faq.question5.question"),
|
||||||
},
|
answer: t("faq.question5.answer"),
|
||||||
];
|
},
|
||||||
|
];
|
||||||
return (
|
return (
|
||||||
<div className="bg-[#1e1d1c] py-20 pb-50 space-y-8">
|
<div className="bg-[#1e1d1c] py-20 pb-50 space-y-8">
|
||||||
{/* header */}
|
{/* header */}
|
||||||
<div className="space-y-4 w-full ">
|
<div className="space-y-4 w-full ">
|
||||||
<div className="flex items-center gap-3 justify-center text-white text-xl">
|
<div className="flex items-center gap-3 justify-center text-white text-xl">
|
||||||
<DotAnimatsiya /> FAQ
|
<DotAnimatsiya /> {locale === "ru" ? "ФАК" : "FAQ"}
|
||||||
</div>
|
</div>
|
||||||
<h1
|
<h1
|
||||||
className="text-center bg-linear-to-br from-white via-white/50 to-black
|
className="text-center bg-linear-to-br from-white via-white/50 to-black
|
||||||
text-transparent bg-clip-text text-3xl font-bold uppercase leading-tight sm:text-4xl md:text-5xl lg:text-6xl"
|
text-transparent bg-clip-text text-3xl font-bold uppercase leading-tight sm:text-4xl md:text-5xl lg:text-6xl"
|
||||||
>
|
>
|
||||||
General Questions
|
{t("faq.banner.topic")}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* FAQ Section */}
|
{/* FAQ Section */}
|
||||||
<div className="md:col-span-2 max-w-6xl mx-auto w-full">
|
<div className="md:col-span-2 max-w-6xl mx-auto w-full px-2">
|
||||||
<FAQAccordion items={faqItems} />
|
<FAQAccordion items={faqItems} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ import { endPoints } from "@/request/links";
|
|||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { useCategory } from "@/store/useCategory";
|
import { useCategory } from "@/store/useCategory";
|
||||||
import Card from "./card";
|
import Card from "./card";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
export function MainSubCategory() {
|
export function MainSubCategory() {
|
||||||
const category = useCategory((state) => state.category);
|
const category = useCategory((state) => state.category);
|
||||||
|
const t = useTranslations();
|
||||||
const { data, isLoading, error } = useQuery({
|
const { data, isLoading, error } = useQuery({
|
||||||
queryKey: ["subCategory"],
|
queryKey: ["subCategory"],
|
||||||
queryFn: () => httpClient(endPoints.subCategory.byId(category.id)),
|
queryFn: () => httpClient(endPoints.subCategory.byId(category.id)),
|
||||||
@@ -27,7 +29,7 @@ export function MainSubCategory() {
|
|||||||
if (error) {
|
if (error) {
|
||||||
return (
|
return (
|
||||||
<div className="text-center text-red-500 py-10">
|
<div className="text-center text-red-500 py-10">
|
||||||
Ma'lumotlarni yuklashda xatolik yuz berdi
|
{t("loading_error")}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -35,7 +37,7 @@ export function MainSubCategory() {
|
|||||||
if (!data || data.length === 0) {
|
if (!data || data.length === 0) {
|
||||||
return (
|
return (
|
||||||
<div className="text-center text-gray-400 py-10">
|
<div className="text-center text-gray-400 py-10">
|
||||||
Mahsulotlar topilmadi
|
{t("products_not_found")}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -43,7 +45,7 @@ export function MainSubCategory() {
|
|||||||
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-5">
|
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-5">
|
||||||
{data.map((item: any) => (
|
{data.map((item: any) => (
|
||||||
<Card
|
<Card
|
||||||
key={item.id} // ✅ index o'rniga id ishlatish
|
key={item.id}
|
||||||
title={item.name}
|
title={item.name}
|
||||||
image={item.image}
|
image={item.image}
|
||||||
slug={item.slug}
|
slug={item.slug}
|
||||||
|
|||||||
@@ -293,6 +293,12 @@
|
|||||||
"succes": "sent!",
|
"succes": "sent!",
|
||||||
"loadingError": "An error occurred while loading data",
|
"loadingError": "An error occurred while loading data",
|
||||||
"productsNotFound": "Products not found",
|
"productsNotFound": "Products not found",
|
||||||
|
"subcategory_not_found": "Subcategory not found",
|
||||||
|
"section": "Section",
|
||||||
|
"clear_all": "Clear all",
|
||||||
|
"image_not_found": "Image not available",
|
||||||
|
"loading_error": "An error occurred while loading data",
|
||||||
|
"products_not_found":"Products not found",
|
||||||
"priceModal": {
|
"priceModal": {
|
||||||
"title": "Get Price",
|
"title": "Get Price",
|
||||||
"product": {
|
"product": {
|
||||||
|
|||||||
@@ -293,6 +293,12 @@
|
|||||||
"succes": "Отправлено!",
|
"succes": "Отправлено!",
|
||||||
"loadingError": "Произошла ошибка при загрузке данных",
|
"loadingError": "Произошла ошибка при загрузке данных",
|
||||||
"productsNotFound": "Товары не найдены",
|
"productsNotFound": "Товары не найдены",
|
||||||
|
"subcategory_not_found": "Подкатегория не найдена",
|
||||||
|
"section": "Раздел",
|
||||||
|
"clear_all": "Очистить всё",
|
||||||
|
"image_not_found": "Изображение отсутствует",
|
||||||
|
"loading_error": "Произошла ошибка при загрузке данных",
|
||||||
|
"products_not_found":"Товары не найдены",
|
||||||
"priceModal": {
|
"priceModal": {
|
||||||
"title": "Узнать цену",
|
"title": "Узнать цену",
|
||||||
"product": {
|
"product": {
|
||||||
|
|||||||
@@ -293,6 +293,12 @@
|
|||||||
"succes": "Yuborildi!",
|
"succes": "Yuborildi!",
|
||||||
"loadingError": "Ma'lumotlarni yuklashda xatolik yuz berdi",
|
"loadingError": "Ma'lumotlarni yuklashda xatolik yuz berdi",
|
||||||
"productsNotFound": "Mahsulotlar topilmadi",
|
"productsNotFound": "Mahsulotlar topilmadi",
|
||||||
|
"subcategory_not_found": "Subkategoriya topilmadi",
|
||||||
|
"section": "Bo'lim",
|
||||||
|
"clear_all":"Barchasini tozalash",
|
||||||
|
"image_not_found":"Rasm mavjud emas",
|
||||||
|
"loading_error": "Ma'lumotlarni yuklashda xatolik yuz berdi",
|
||||||
|
"products_not_found":"Mahsulotlar topilmadi",
|
||||||
"priceModal": {
|
"priceModal": {
|
||||||
"title": "Narxni bilish",
|
"title": "Narxni bilish",
|
||||||
"product": {
|
"product": {
|
||||||
|
|||||||
Reference in New Issue
Block a user