complated service and service detail page connection to backend
This commit is contained in:
@@ -9,19 +9,34 @@ import {
|
|||||||
SystemFeature,
|
SystemFeature,
|
||||||
} from "@/lib/api/demoapi/operationalSystems";
|
} from "@/lib/api/demoapi/operationalSystems";
|
||||||
import { Breadcrumb } from "@/components/breadCrumb";
|
import { Breadcrumb } from "@/components/breadCrumb";
|
||||||
|
import { useServiceDetail } from "@/store/useService";
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
import httpClient from "@/request/api";
|
||||||
|
import { endPoints } from "@/request/links";
|
||||||
|
|
||||||
export default function OperationalSystemsPage() {
|
export default function OperationalSystemsPage() {
|
||||||
const t = useTranslations("operationalSystems");
|
const t = useTranslations("operationalSystems");
|
||||||
const [data, setData] = useState<SystemFeature[] | null>(null);
|
const serviceId = useServiceDetail((state) => state.serviceId);
|
||||||
const [loading, setLoading] = useState(true);
|
console.log("service id: ", serviceId);
|
||||||
const [error, setError] = useState(false);
|
|
||||||
|
const {
|
||||||
|
data,
|
||||||
|
isLoading: loading,
|
||||||
|
isError: error,
|
||||||
|
} = useQuery({
|
||||||
|
queryKey: ["firesafety", serviceId],
|
||||||
|
queryFn: () => httpClient(endPoints.services.detail(serviceId || 0)),
|
||||||
|
select: (data) => data?.data?.data,
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("service detail: ", data);
|
||||||
|
|
||||||
// Demo data - fallback ma'lumotlar
|
// Demo data - fallback ma'lumotlar
|
||||||
const demoData: SystemFeature[] = [
|
const demoData: SystemFeature[] = [
|
||||||
{
|
{
|
||||||
id: "1",
|
id: "1",
|
||||||
title: t("systems.sprinkler.title"),
|
title: t("systems.sprinkler.title"),
|
||||||
shortDesc:t("systems.sprinkler.short-desc"),
|
shortDesc: t("systems.sprinkler.short-desc"),
|
||||||
description: t("systems.sprinkler.description"),
|
description: t("systems.sprinkler.description"),
|
||||||
features: [
|
features: [
|
||||||
t("systems.sprinkler.features.0"),
|
t("systems.sprinkler.features.0"),
|
||||||
@@ -33,33 +48,6 @@ export default function OperationalSystemsPage() {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const fetchData = async () => {
|
|
||||||
try {
|
|
||||||
setLoading(true);
|
|
||||||
setError(false);
|
|
||||||
|
|
||||||
const result = await getOperationalSystems();
|
|
||||||
|
|
||||||
// Agar backend ma'lumot qaytarsa
|
|
||||||
if (result && result.length > 0) {
|
|
||||||
setData(result);
|
|
||||||
} else {
|
|
||||||
// Backend bo'sh ma'lumot qaytarsa, demo ma'lumotlarni ishlatamiz
|
|
||||||
setData(demoData);
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
setError(true);
|
|
||||||
// Xatolik bo'lsa, demo ma'lumotlarni ishlatamiz
|
|
||||||
setData(demoData);
|
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
fetchData();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
// Animation variants
|
// Animation variants
|
||||||
const containerVariants = {
|
const containerVariants = {
|
||||||
hidden: { opacity: 0 },
|
hidden: { opacity: 0 },
|
||||||
@@ -128,14 +116,6 @@ export default function OperationalSystemsPage() {
|
|||||||
>
|
>
|
||||||
<div className="text-7xl">⚠️</div>
|
<div className="text-7xl">⚠️</div>
|
||||||
<p className="text-white text-xl font-medium">{t("error")}</p>
|
<p className="text-white text-xl font-medium">{t("error")}</p>
|
||||||
<motion.button
|
|
||||||
whileHover={{ scale: 1.05 }}
|
|
||||||
whileTap={{ scale: 0.95 }}
|
|
||||||
onClick={fetchData}
|
|
||||||
className="px-6 py-3 bg-red-500 text-white rounded-lg font-medium hover:bg-red-600 transition-colors"
|
|
||||||
>
|
|
||||||
{t("retry")}
|
|
||||||
</motion.button>
|
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -143,43 +123,12 @@ export default function OperationalSystemsPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="pt-20 md:pt-30 pb-35 max-w-6xl mx-auto w-full px-4">
|
<div className="pt-20 md:pt-30 pb-35 max-w-6xl mx-auto w-full px-4">
|
||||||
{/* Header */}
|
|
||||||
{/* <motion.div
|
|
||||||
variants={containerVariants}
|
|
||||||
initial="hidden"
|
|
||||||
animate="visible"
|
|
||||||
className="flex md:flex-row flex-col items-start justify-between gap-6 md:gap-8 w-full mb-16 md:mb-24"
|
|
||||||
>
|
|
||||||
<motion.div variants={itemVariants} className="space-y-4 md:space-y-8 flex-1">
|
|
||||||
<h1 className="bg-linear-to-br from-white via-white to-gray-400 text-transparent bg-clip-text text-3xl md:text-4xl lg:text-5xl font-semibold font-almarai">
|
|
||||||
{t('title')}
|
|
||||||
</h1>
|
|
||||||
<p className="text-white font-medium font-unbounded text-base sm:text-lg md:text-xl max-w-2xl leading-relaxed">
|
|
||||||
{t('subtitle')}
|
|
||||||
</p>
|
|
||||||
</motion.div>
|
|
||||||
|
|
||||||
<motion.div
|
|
||||||
variants={itemVariants}
|
|
||||||
whileHover={{ scale: 1.05, rotate: 3 }}
|
|
||||||
transition={{ type: "spring", stiffness: 300, damping: 20 }}
|
|
||||||
className="shrink-0 relative"
|
|
||||||
>
|
|
||||||
<Image
|
|
||||||
src="/images/home/redShlang.png"
|
|
||||||
alt="Fire hose"
|
|
||||||
fill
|
|
||||||
priority
|
|
||||||
className="w-32 h-32 sm:w-40 sm:h-40 md:w-48 md:h-48 lg:w-52 lg:h-52 object-contain"
|
|
||||||
/>
|
|
||||||
</motion.div>
|
|
||||||
</motion.div> */}
|
|
||||||
<div className="mb-5">
|
<div className="mb-5">
|
||||||
<Breadcrumb />
|
<Breadcrumb />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Main Content */}
|
{/* Main Content */}
|
||||||
{!data || data.length === 0 ? (
|
{!data || data.legth === 0 ? (
|
||||||
<motion.div
|
<motion.div
|
||||||
initial={{ opacity: 0 }}
|
initial={{ opacity: 0 }}
|
||||||
animate={{ opacity: 1 }}
|
animate={{ opacity: 1 }}
|
||||||
@@ -194,9 +143,7 @@ export default function OperationalSystemsPage() {
|
|||||||
animate="visible"
|
animate="visible"
|
||||||
className="space-y-12 md:space-y-20"
|
className="space-y-12 md:space-y-20"
|
||||||
>
|
>
|
||||||
{data.map((system, index) => (
|
|
||||||
<motion.div
|
<motion.div
|
||||||
key={system.id}
|
|
||||||
variants={cardVariants}
|
variants={cardVariants}
|
||||||
whileHover={{ y: -8 }}
|
whileHover={{ y: -8 }}
|
||||||
className={`flex flex-col gap-8 md:gap-12 items-center`}
|
className={`flex flex-col gap-8 md:gap-12 items-center`}
|
||||||
@@ -208,8 +155,8 @@ export default function OperationalSystemsPage() {
|
|||||||
className="w-full relative h-64 md:h-80 lg:h-96 rounded-xl overflow-hidden"
|
className="w-full relative h-64 md:h-80 lg:h-96 rounded-xl overflow-hidden"
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
src={system.image}
|
src={data?.detail_image}
|
||||||
alt={system.title}
|
alt={data.title}
|
||||||
fill
|
fill
|
||||||
className="object-cover w-full h-auto"
|
className="object-cover w-full h-auto"
|
||||||
/>
|
/>
|
||||||
@@ -219,37 +166,36 @@ export default function OperationalSystemsPage() {
|
|||||||
{/* Content Section */}
|
{/* Content Section */}
|
||||||
<div className="w-full space-y-6">
|
<div className="w-full space-y-6">
|
||||||
<motion.h2
|
<motion.h2
|
||||||
initial={{ opacity: 0, x: index % 2 === 0 ? -20 : 20 }}
|
initial={{ opacity: 0, x: data?.id % 2 === 0 ? -20 : 20 }}
|
||||||
whileInView={{ opacity: 1, x: 0 }}
|
whileInView={{ opacity: 1, x: 0 }}
|
||||||
viewport={{ once: true }}
|
viewport={{ once: true }}
|
||||||
transition={{ duration: 0.6 }}
|
transition={{ duration: 0.6 }}
|
||||||
className="text-2xl md:text-3xl lg:text-4xl font-bold text-white font-almarai"
|
className="text-2xl md:text-3xl lg:text-4xl font-bold text-white font-almarai"
|
||||||
>
|
>
|
||||||
{system.title}
|
{data.title}
|
||||||
</motion.h2>
|
</motion.h2>
|
||||||
|
|
||||||
<motion.p
|
<motion.p
|
||||||
initial={{ opacity: 0, x: index % 2 === 0 ? -20 : 20 }}
|
initial={{ opacity: 0, x: data?.id % 2 === 0 ? -20 : 20 }}
|
||||||
whileInView={{ opacity: 1, x: 0 }}
|
whileInView={{ opacity: 1, x: 0 }}
|
||||||
viewport={{ once: true }}
|
viewport={{ once: true }}
|
||||||
transition={{ duration: 0.6, delay: 0.1 }}
|
transition={{ duration: 0.6, delay: 0.1 }}
|
||||||
className="text-gray-300 text-sm md:text-base leading-relaxed font-unbounded"
|
className="text-gray-300 text-sm md:text-base leading-relaxed font-unbounded"
|
||||||
>
|
>
|
||||||
{system.shortDesc}
|
{data.subtitle}
|
||||||
</motion.p>
|
</motion.p>
|
||||||
|
|
||||||
<motion.p
|
<motion.p
|
||||||
initial={{ opacity: 0, x: index % 2 === 0 ? -20 : 20 }}
|
initial={{ opacity: 0, x: data?.id % 2 === 0 ? -20 : 20 }}
|
||||||
whileInView={{ opacity: 1, x: 0 }}
|
whileInView={{ opacity: 1, x: 0 }}
|
||||||
viewport={{ once: true }}
|
viewport={{ once: true }}
|
||||||
transition={{ duration: 0.6, delay: 0.1 }}
|
transition={{ duration: 0.6, delay: 0.1 }}
|
||||||
className="text-gray-300 text-sm md:text-base leading-relaxed font-unbounded"
|
className="text-gray-300 text-sm md:text-base leading-relaxed font-unbounded"
|
||||||
>
|
>
|
||||||
{system.description}
|
{data?.description}
|
||||||
</motion.p>
|
</motion.p>
|
||||||
|
|
||||||
<div className="space-y-4">
|
{/* <div className="space-y-4">
|
||||||
|
|
||||||
<ul className="space-y-3">
|
<ul className="space-y-3">
|
||||||
{system.features.map((feature, featureIndex) => (
|
{system.features.map((feature, featureIndex) => (
|
||||||
<motion.li
|
<motion.li
|
||||||
@@ -269,10 +215,9 @@ export default function OperationalSystemsPage() {
|
|||||||
</motion.li>
|
</motion.li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div> */}
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
))}
|
|
||||||
</motion.div>
|
</motion.div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default function ProductCard({
|
|||||||
|
|
||||||
{/* Content Container */}
|
{/* Content Container */}
|
||||||
<div className="p-6 sm:p-4">
|
<div className="p-6 sm:p-4">
|
||||||
<h3 className="text-lg text-center sm:text-xl md:text-2xl font-unbounded font-bold text-white mb-4 line-clamp-3 group-hover:text-red-400 transition-colors duration-300">
|
<h3 className="text-lg text-center font-unbounded font-bold text-white mb-4 line-clamp-3 group-hover:text-red-400 transition-colors duration-300">
|
||||||
{title}
|
{title}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
import { usePriceModalStore } from "@/store/useProceModalStore";
|
import { usePriceModalStore } from "@/store/useProceModalStore";
|
||||||
import { Instagram, Send, Share2 } from "lucide-react";
|
import { Instagram, Send, Share2 } from "lucide-react";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
|
import { useParams } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
interface RightSideProps {
|
interface RightSideProps {
|
||||||
id: number;
|
id: number;
|
||||||
@@ -23,6 +27,45 @@ export function RightSide({
|
|||||||
}: RightSideProps) {
|
}: RightSideProps) {
|
||||||
const openModal = usePriceModalStore((state) => state.openModal);
|
const openModal = usePriceModalStore((state) => state.openModal);
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
|
const params = useParams();
|
||||||
|
const locale = params.locale || "uz";
|
||||||
|
const [copied, setCopied] = useState(false);
|
||||||
|
|
||||||
|
const handleShare = async () => {
|
||||||
|
const productUrl = `${window.location.origin}/${locale}/products/special_product?productId=${id}`;
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Modern Web Share API dan foydalanish (mobil qurilmalar uchun)
|
||||||
|
if (navigator.share) {
|
||||||
|
await navigator.share({
|
||||||
|
title: title,
|
||||||
|
text: `${title} - ${description.slice(0, 100)}...`,
|
||||||
|
url: productUrl,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// Desktop uchun clipboard ga copy qilish
|
||||||
|
await navigator.clipboard.writeText(productUrl);
|
||||||
|
setCopied(true);
|
||||||
|
|
||||||
|
// 2 soniyadan keyin "Copied" holatini o'chirish
|
||||||
|
setTimeout(() => {
|
||||||
|
setCopied(false);
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Share error:", error);
|
||||||
|
// Fallback - clipboard ga copy qilish
|
||||||
|
try {
|
||||||
|
await navigator.clipboard.writeText(productUrl);
|
||||||
|
setCopied(true);
|
||||||
|
setTimeout(() => {
|
||||||
|
setCopied(false);
|
||||||
|
}, 2000);
|
||||||
|
} catch (clipboardError) {
|
||||||
|
console.error("Clipboard error:", clipboardError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const handleGetPrice = () => {
|
const handleGetPrice = () => {
|
||||||
openModal({
|
openModal({
|
||||||
@@ -54,7 +97,9 @@ export function RightSide({
|
|||||||
|
|
||||||
{/* Status Badge */}
|
{/* Status Badge */}
|
||||||
<div>
|
<div>
|
||||||
<span className={`inline-block px-4 py-2 rounded-lg text-sm font-semibold ${statusColor}`}>
|
<span
|
||||||
|
className={`inline-block px-4 py-2 rounded-lg text-sm font-semibold ${statusColor}`}
|
||||||
|
>
|
||||||
{status}
|
{status}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -85,21 +130,25 @@ export function RightSide({
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
{/* Social Share */}
|
{/* Social Share */}
|
||||||
<div className="pt-4 border-t border-gray-800">
|
<div className="pt-4 border-t border-gray-800 flex items-center gap-5">
|
||||||
<div className="flex items-center gap-3 mb-3">
|
<button
|
||||||
<Share2 className="w-5 h-5 text-gray-400" />
|
onClick={handleShare}
|
||||||
<span className="text-sm text-gray-400">{t("products.share")}:</span>
|
className="p-2.5 rounded-md bg-white text-red-500 hover:text-white hover:bg-red-500 flex items-center gap-3"
|
||||||
</div>
|
>
|
||||||
<div className="flex items-center gap-5 mt-5">
|
<Share2 className="w-5 h-5" />
|
||||||
|
<span className="text-sm">{t("products.share")}</span>
|
||||||
|
</button>
|
||||||
{/* <a href="" className="p-2 rounded-md bg-white text-red-500 hover:text-white hover:bg-red-500">
|
{/* <a href="" className="p-2 rounded-md bg-white text-red-500 hover:text-white hover:bg-red-500">
|
||||||
<Instagram />
|
<Instagram />
|
||||||
</a> */}
|
</a> */}
|
||||||
<a href="https://t.me/ignum_tech" className="p-2 rounded-md bg-white text-red-500 hover:text-white hover:bg-red-500">
|
<a
|
||||||
|
href="https://t.me/ignum_tech"
|
||||||
|
className="p-2 rounded-md bg-white text-red-500 hover:text-white hover:bg-red-500"
|
||||||
|
>
|
||||||
<Send />
|
<Send />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
"use client"
|
"use client";
|
||||||
import DotAnimatsiya from "@/components/dot/DotAnimatsiya";
|
import DotAnimatsiya from "@/components/dot/DotAnimatsiya";
|
||||||
import httpClient from "@/request/api";
|
import httpClient from "@/request/api";
|
||||||
import { endPoints } from "@/request/links";
|
import { endPoints } from "@/request/links";
|
||||||
@@ -10,15 +10,18 @@ import Link from "next/link";
|
|||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
import { ServicesLoading } from "./loading";
|
import { ServicesLoading } from "./loading";
|
||||||
import { EmptyServices } from "./empty";
|
import { EmptyServices } from "./empty";
|
||||||
|
import { useServiceDetail } from "@/store/useService";
|
||||||
|
|
||||||
export function OurService() {
|
export function OurService() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
const locale = useLocale();
|
const locale = useLocale();
|
||||||
|
const setServiceId = useServiceDetail((state) => state.setServiceId);
|
||||||
|
|
||||||
// get request
|
// get request
|
||||||
const { data, isLoading, isError } = useQuery({
|
const { data, isLoading, isError } = useQuery({
|
||||||
queryKey: ['firesafety'],
|
queryKey: ["firesafety"],
|
||||||
queryFn: () => httpClient(endPoints.services.all)
|
queryFn: () => httpClient(endPoints.services.all),
|
||||||
|
select: (data) => data?.data?.data?.results,
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("service data: ", data);
|
console.log("service data: ", data);
|
||||||
@@ -84,44 +87,52 @@ export function OurService() {
|
|||||||
animate="visible"
|
animate="visible"
|
||||||
>
|
>
|
||||||
{/* cards */}
|
{/* cards */}
|
||||||
<div className="max-w-250 w-full mx-auto flex sm:flex-row flex-col items-center gap-5 my-10">
|
<div className="max-w-250 w-full mx-auto overflow-hidden flex sm:flex-row flex-col items-center gap-5 my-10">
|
||||||
<motion.div variants={cardVariants} className="sm:w-[55%] w-full">
|
<motion.div
|
||||||
|
variants={cardVariants}
|
||||||
|
className="sm:w-[55%] overflow-hidden w-full"
|
||||||
|
onClick={() => setServiceId(data[0].id)}
|
||||||
|
>
|
||||||
<Link
|
<Link
|
||||||
href={`/${locale}/services/detail`}
|
href={`/${locale}/services/detail`}
|
||||||
className="block hover:cursor-pointer relative space-y-4 py-6 px-8 rounded-xl w-full bg-[linear-gradient(to_bottom_right,#000000,#190b00,#542604,#8f4308)] hover:shadow-2xl hover:shadow-red-500/20 transition-all duration-300"
|
className="overflow-hidden block hover:cursor-pointer relative space-y-4 py-6 px-8 rounded-xl w-full bg-[linear-gradient(to_bottom_right,#000000,#190b00,#542604,#8f4308)] hover:shadow-2xl hover:shadow-red-500/20 transition-all duration-300"
|
||||||
>
|
>
|
||||||
<p className="uppercase font-unbounded font-bold bg-linear-to-br from-white via-white to-black text-transparent bg-clip-text">
|
<p className="uppercase font-unbounded font-bold bg-linear-to-br from-white via-white to-black text-transparent bg-clip-text">
|
||||||
{t("home.services.services.operation.title")}
|
{data[0].title}
|
||||||
</p>
|
</p>
|
||||||
<p className="font-almarai text-gray-400 max-w-80 w-full">
|
<p className="font-almarai text-gray-400 max-w-80 w-full">
|
||||||
{t("home.services.services.operation.description")}
|
{data[0].subtitle}
|
||||||
</p>
|
</p>
|
||||||
<button className="font-almarai text-[#dc2626] font-semibold flex items-center gap-2 text-sm hover:gap-3 transition-all">
|
<button className="font-almarai text-[#dc2626] font-semibold flex items-center gap-2 text-sm hover:gap-3 transition-all">
|
||||||
{t("home.services.learnmore")} <ChevronRight size={20} />
|
{t("home.services.learnmore")} <ChevronRight size={20} />
|
||||||
</button>
|
</button>
|
||||||
<Image
|
<Image
|
||||||
src="/images/home/gruop.png"
|
src={data[0].main_image}
|
||||||
alt="images"
|
alt="images"
|
||||||
width={200}
|
width={200}
|
||||||
height={100}
|
height={100}
|
||||||
className="object-contain sm:absolute bottom-0 right-2 z-10"
|
className="object-contain sm:absolute bottom-0 -right-2 z-10"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
||||||
<motion.div variants={cardVariants} className="sm:w-[45%] w-full">
|
<motion.div
|
||||||
|
onClick={() => setServiceId(data[1].id)}
|
||||||
|
variants={cardVariants}
|
||||||
|
className="sm:w-[45%] w-full"
|
||||||
|
>
|
||||||
<div className="hover:cursor-pointer relative overflow-hidden space-y-4 py-6 px-8 rounded-xl w-full bg-[linear-gradient(to_bottom_right,#000000,#190b00,#542604,#8f4308)] hover:shadow-2xl hover:shadow-red-500/20 transition-all duration-300">
|
<div className="hover:cursor-pointer relative overflow-hidden space-y-4 py-6 px-8 rounded-xl w-full bg-[linear-gradient(to_bottom_right,#000000,#190b00,#542604,#8f4308)] hover:shadow-2xl hover:shadow-red-500/20 transition-all duration-300">
|
||||||
<p className="uppercase font-unbounded font-bold bg-linear-to-br from-white via-white to-black text-transparent bg-clip-text">
|
<p className="uppercase font-unbounded font-bold bg-linear-to-br from-white via-white to-black text-transparent bg-clip-text">
|
||||||
{t("home.services.services.suppression.title")}
|
{data[1].title}
|
||||||
</p>
|
</p>
|
||||||
<p className="font-almarai text-gray-400 max-w-70 w-full">
|
<p className="font-almarai text-gray-400 max-w-70 w-full">
|
||||||
{t("home.services.services.suppression.description")}
|
{data[1].subtitle}
|
||||||
</p>
|
</p>
|
||||||
<button className="font-almarai text-[#dc2626] font-semibold flex items-center gap-2 text-sm hover:gap-3 transition-all">
|
<button className="font-almarai text-[#dc2626] font-semibold flex items-center gap-2 text-sm hover:gap-3 transition-all">
|
||||||
{t("home.services.learnmore")} <ChevronRight size={20} />
|
{t("home.services.learnmore")} <ChevronRight size={20} />
|
||||||
</button>
|
</button>
|
||||||
<Image
|
<Image
|
||||||
src="/images/home/redShlang.png"
|
src={data[1].main_image}
|
||||||
alt="images"
|
alt="images"
|
||||||
width={200}
|
width={200}
|
||||||
height={100}
|
height={100}
|
||||||
@@ -132,13 +143,17 @@ export function OurService() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="max-w-250 flex sm:flex-row flex-col items-start justify-between gap-5 mt- w-full mx-auto">
|
<div className="max-w-250 flex sm:flex-row flex-col items-start justify-between gap-5 mt- w-full mx-auto">
|
||||||
<motion.div variants={cardVariants} className="sm:w-[40%] w-full -mt-5">
|
<motion.div
|
||||||
|
variants={cardVariants}
|
||||||
|
onClick={() => setServiceId(data[2].id)}
|
||||||
|
className="sm:w-[40%] w-full -mt-5"
|
||||||
|
>
|
||||||
<Link
|
<Link
|
||||||
href={`/${locale}/services/detail`}
|
href={`/${locale}/services/detail`}
|
||||||
className="block hover:cursor-pointer relative rounded-xl w-full bg-[linear-gradient(to_bottom_right,#000000,#190b00,#542604,#8f4308)] hover:shadow-2xl hover:shadow-red-500/20 transition-all duration-300"
|
className="block hover:cursor-pointer relative rounded-xl w-full bg-[linear-gradient(to_bottom_right,#000000,#190b00,#542604,#8f4308)] hover:shadow-2xl hover:shadow-red-500/20 transition-all duration-300"
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
src="/images/home/ambulance.png"
|
src={data[2].main_image}
|
||||||
alt="images"
|
alt="images"
|
||||||
width={300}
|
width={300}
|
||||||
height={200}
|
height={200}
|
||||||
@@ -146,10 +161,10 @@ export function OurService() {
|
|||||||
/>
|
/>
|
||||||
<div className="space-y-4 py-6 px-8">
|
<div className="space-y-4 py-6 px-8">
|
||||||
<p className="uppercase font-unbounded font-bold bg-linear-to-br from-white via-white to-black text-transparent bg-clip-text">
|
<p className="uppercase font-unbounded font-bold bg-linear-to-br from-white via-white to-black text-transparent bg-clip-text">
|
||||||
{t("home.services.services.safety.title")}
|
{data[2].title}
|
||||||
</p>
|
</p>
|
||||||
<p className="font-almarai text-gray-400 max-w-80 w-full">
|
<p className="font-almarai text-gray-400 max-w-80 w-full">
|
||||||
{t("home.services.services.safety.description")}
|
{data[2].subtitle}
|
||||||
</p>
|
</p>
|
||||||
<button className="font-almarai text-[#dc2626] font-semibold flex items-center gap-2 text-sm hover:gap-3 transition-all">
|
<button className="font-almarai text-[#dc2626] font-semibold flex items-center gap-2 text-sm hover:gap-3 transition-all">
|
||||||
{t("home.services.learnmore")} <ChevronRight size={20} />
|
{t("home.services.learnmore")} <ChevronRight size={20} />
|
||||||
@@ -159,20 +174,24 @@ export function OurService() {
|
|||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
||||||
<div className="sm:w-[60%] w-full">
|
<div className="sm:w-[60%] w-full">
|
||||||
<motion.div variants={cardVariants}>
|
<motion.div
|
||||||
|
onClick={() => setServiceId(data[3].id)}
|
||||||
|
variants={cardVariants}
|
||||||
|
>
|
||||||
<Link href={`/${locale}/services/detail`}>
|
<Link href={`/${locale}/services/detail`}>
|
||||||
<div className="hover:cursor-pointer relative overflow-hidden space-y-4 py-6 px-8 rounded-xl w-full bg-[linear-gradient(to_bottom_right,#000000,#190b00,#542604,#8f4308)] hover:shadow-2xl hover:shadow-red-500/20 transition-all duration-300">
|
<div className="hover:cursor-pointer relative overflow-hidden space-y-4 py-6 px-8 rounded-xl w-full bg-[linear-gradient(to_bottom_right,#000000,#190b00,#542604,#8f4308)] hover:shadow-2xl hover:shadow-red-500/20 transition-all duration-300">
|
||||||
<p className="uppercase font-unbounded font-bold bg-linear-to-br from-white via-white to-black text-transparent bg-clip-text">
|
<p className="uppercase font-unbounded font-bold bg-linear-to-br from-white via-white to-black text-transparent bg-clip-text">
|
||||||
{t("home.services.services.monitoring.title")}
|
{data[3].title}
|
||||||
</p>
|
</p>
|
||||||
<p className="font-almarai text-gray-400 max-w-70 w-full">
|
<p className="font-almarai text-gray-400 max-w-70 w-full">
|
||||||
{t("home.services.services.monitoring.description")}
|
{data[3].subtitle}
|
||||||
</p>
|
</p>
|
||||||
<button className="font-almarai sm:mt-38 mt-0 text-[#dc2626] font-semibold flex items-center gap-2 text-sm hover:gap-3 transition-all">
|
<button className="font-almarai sm:mt-35 mt-0 text-[#dc2626] font-semibold flex items-center gap-2 text-sm hover:gap-3 transition-all">
|
||||||
{t("home.services.learnmore")} <ChevronRight size={20} />
|
{t("home.services.learnmore")}{" "}
|
||||||
|
<ChevronRight size={20} />
|
||||||
</button>
|
</button>
|
||||||
<Image
|
<Image
|
||||||
src="/images/home/balon.png"
|
src={data[3].main_image}
|
||||||
alt="images"
|
alt="images"
|
||||||
width={200}
|
width={200}
|
||||||
height={100}
|
height={100}
|
||||||
@@ -184,7 +203,7 @@ export function OurService() {
|
|||||||
|
|
||||||
<motion.div
|
<motion.div
|
||||||
variants={cardVariants}
|
variants={cardVariants}
|
||||||
className="py-6 px-8 rounded-xl mt-5 w-full p-5 bg-[linear-gradient(to_top_right,#000000,#190b00,#542604,#8f4308)] flex sm:flex-row flex-col gap-5 items-center justify-between hover:shadow-2xl hover:shadow-red-500/20 transition-all duration-300"
|
className="py-4 px-8 rounded-xl mt-5 w-full p-5 bg-[linear-gradient(to_top_right,#000000,#190b00,#542604,#8f4308)] flex sm:flex-row flex-col gap-5 items-center justify-between hover:shadow-2xl hover:shadow-red-500/20 transition-all duration-300"
|
||||||
>
|
>
|
||||||
<h2 className="font-unbounded sm:text-3xl text-xl font-semibold font-armanai text-white">
|
<h2 className="font-unbounded sm:text-3xl text-xl font-semibold font-armanai text-white">
|
||||||
{t("home.services.viewMoreServices")}
|
{t("home.services.viewMoreServices")}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export default function Card({
|
|||||||
|
|
||||||
{/* Content Container */}
|
{/* Content Container */}
|
||||||
<div className="p-6 sm:p-4">
|
<div className="p-6 sm:p-4">
|
||||||
<h3 className="text-lg text-center sm:text-xl md:text-2xl font-unbounded font-bold text-white mb-4 line-clamp-3 group-hover:text-red-400 transition-colors duration-300">
|
<h3 className="text-lg text-center font-unbounded font-bold text-white mb-4 line-clamp-3 group-hover:text-red-400 transition-colors duration-300">
|
||||||
{title}
|
{title}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -165,7 +165,8 @@
|
|||||||
"send": "Send Message",
|
"send": "Send Message",
|
||||||
"share": "Share",
|
"share": "Share",
|
||||||
"features": "Features",
|
"features": "Features",
|
||||||
"feature": "Feature"
|
"feature": "Feature",
|
||||||
|
"copied": "Link copied!"
|
||||||
},
|
},
|
||||||
"faq": {
|
"faq": {
|
||||||
"banner": {
|
"banner": {
|
||||||
|
|||||||
@@ -165,7 +165,8 @@
|
|||||||
"send": "Отправить сообщение",
|
"send": "Отправить сообщение",
|
||||||
"share": "Поделиться",
|
"share": "Поделиться",
|
||||||
"features": "Характеристики",
|
"features": "Характеристики",
|
||||||
"feature": "Характеристика"
|
"feature": "Характеристика",
|
||||||
|
"copied": "Ссылка скопирована!"
|
||||||
},
|
},
|
||||||
"faq": {
|
"faq": {
|
||||||
"banner": {
|
"banner": {
|
||||||
|
|||||||
@@ -146,9 +146,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"products": {
|
"products": {
|
||||||
"noData":{
|
"noData": {
|
||||||
"title":"Katalog topilmadi",
|
"title": "Katalog topilmadi",
|
||||||
"description":"Hozircha kategoriyalar mavjud emas. Keyinroq urinib ko'ring"
|
"description": "Hozircha kategoriyalar mavjud emas. Keyinroq urinib ko'ring"
|
||||||
},
|
},
|
||||||
"catalog": {
|
"catalog": {
|
||||||
"blockdescription": "Avtomatik yong‘in o‘chirish tizimlari va ichki yong‘inga qarshi suv ta’minoti uchun polipropilen quvurlar va fitinglar",
|
"blockdescription": "Avtomatik yong‘in o‘chirish tizimlari va ichki yong‘inga qarshi suv ta’minoti uchun polipropilen quvurlar va fitinglar",
|
||||||
@@ -161,11 +161,12 @@
|
|||||||
"description": "Biz nafaqat uskunalar yetkazib beramiz, balki har bir mijozning muvaffaqiyatli hamkoriga aylanamiz."
|
"description": "Biz nafaqat uskunalar yetkazib beramiz, balki har bir mijozning muvaffaqiyatli hamkoriga aylanamiz."
|
||||||
},
|
},
|
||||||
"ourproducts": "Bizning mahsulotlarimiz",
|
"ourproducts": "Bizning mahsulotlarimiz",
|
||||||
"price":"Narx",
|
"price": "Narx",
|
||||||
"send":"Xabar yuborish",
|
"send": "Xabar yuborish",
|
||||||
"share":"Ulashish",
|
"share": "Ulashish",
|
||||||
"features":"Xususiyatlar",
|
"features": "Xususiyatlar",
|
||||||
"feature":"Xususiyat"
|
"feature": "Xususiyat",
|
||||||
|
"copied": "Link nusxalandi!"
|
||||||
},
|
},
|
||||||
"faq": {
|
"faq": {
|
||||||
"banner": {
|
"banner": {
|
||||||
@@ -233,8 +234,8 @@
|
|||||||
},
|
},
|
||||||
"address": "Toshkent shahri , Yunusabod tumani , Niyozbek yo'li 3 tor ko'chasi , 39 uy",
|
"address": "Toshkent shahri , Yunusabod tumani , Niyozbek yo'li 3 tor ko'chasi , 39 uy",
|
||||||
"create": "{name} - Jamoasi tomonidan ishlab chiqilgan",
|
"create": "{name} - Jamoasi tomonidan ishlab chiqilgan",
|
||||||
"terms":"Foydalanish shartlari",
|
"terms": "Foydalanish shartlari",
|
||||||
"privacy":"Maxfiylik siyosati"
|
"privacy": "Maxfiylik siyosati"
|
||||||
},
|
},
|
||||||
"operationalSystems": {
|
"operationalSystems": {
|
||||||
"title": "Operatsion tizimlar",
|
"title": "Operatsion tizimlar",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export const endPoints = {
|
|||||||
},
|
},
|
||||||
services: {
|
services: {
|
||||||
all: "firesafety/",
|
all: "firesafety/",
|
||||||
detail: (id: number) => `/api/firesafety/${id}`,
|
detail: (id: number) => `firesafety/${id}`,
|
||||||
},
|
},
|
||||||
product: {
|
product: {
|
||||||
byCategory: (categoryId: number) => `product/?category=${categoryId}`,
|
byCategory: (categoryId: number) => `product/?category=${categoryId}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user