diff --git a/src/pages/site-banner/ui/BannerCarousel.tsx b/src/pages/site-banner/ui/BannerCarousel.tsx deleted file mode 100644 index 4668644..0000000 --- a/src/pages/site-banner/ui/BannerCarousel.tsx +++ /dev/null @@ -1,112 +0,0 @@ -"use client"; - -import { getBanner } from "@/pages/site-banner/lib/api"; -import { Card } from "@/shared/ui/card"; -import { - Carousel, - CarouselContent, - CarouselItem, - CarouselNext, - CarouselPrevious, -} from "@/shared/ui/carousel"; -import { useQuery } from "@tanstack/react-query"; -import { AlertTriangle, Loader2, MoveRightIcon } from "lucide-react"; -import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; - -const BannerCarousel = () => { - const { t } = useTranslation(); - - // 🧠 Bannerlarni backenddan olish - const { data, isLoading, isError, refetch } = useQuery({ - queryKey: ["all_banner"], - queryFn: () => getBanner(), - select: (res) => - res.data.data.results.filter((b) => b.position === "banner1"), - }); - - const colors = ["#EDF5C7", "#F5DCC7"]; - - if (isLoading) - return ( -
- -
- ); - - if (isError) - return ( -
- -

{t("Ma'lumotlarni yuklashda xatolik yuz berdi.")}

- -
- ); - - if (!data || data.length === 0) - return ( -
- {t("Hozircha bannerlar mavjud emas")} -
- ); - - return ( -
- - - {data.map((banner, index) => ( - -
- - {/* */} - - {/* Matn qismi */} -
-

- {banner.title} -

-

- {banner.description} -

- -

{t("Batafsil")}

- - -
- - {/* Rasm qismi */} -
- {banner.title} -
-
-
-
- ))} -
- - - -
-
- ); -}; - -export default BannerCarousel; diff --git a/src/pages/support/ui/SupportAgency.tsx b/src/pages/support/ui/SupportAgency.tsx index 9bfd432..30b9487 100644 --- a/src/pages/support/ui/SupportAgency.tsx +++ b/src/pages/support/ui/SupportAgency.tsx @@ -8,46 +8,7 @@ import { useState } from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; -interface Data { - id: number; - name: string; - address: string; - email: string; - phone: string; - instagram: string; - web_site: string; - documents: string[]; -} - -const sampleData: Data[] = [ - { - id: 1, - name: "Alpha Travel", - address: "Tashkent, Mustaqillik ko'chasi 12", - email: "alpha@example.com", - phone: "+998901234567", - instagram: "https://instagram.com/alphatravel", - web_site: "https://alphatravel.uz", - documents: [ - "https://turan-travel.com/uploads/files/license/sertificate.jpg", - "https://turan-travel.com/uploads/files/license/sertificate.jpg", - ], - }, - { - id: 2, - name: "Samarkand Tours", - address: "Samarkand, Registon 5", - email: "info@samarktours.uz", - phone: "+998903334455", - instagram: "https://instagram.com/samarktours", - web_site: "https://samarktours.uz", - documents: [ - "https://turan-travel.com/uploads/files/license/sertificate.jpg", - ], - }, -]; - -const SupportAgency = ({ requests = sampleData }) => { +const SupportAgency = () => { const [query, setQuery] = useState(""); const { t } = useTranslation(); const [selected, setSelected] = useState(null);