import React, { useState } from "react"; import { Card, CardContent } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; import { Button } from "@/components/ui/button"; import { motion } from "framer-motion"; import { Switch } from "@/components/ui/switch"; import { FaTelegramPlane, FaWhatsapp, FaInstagram, FaYoutube } from "react-icons/fa"; const carData = [ { id: 1, name: "Toyota Crown", year: 2020, mileage: "30,000 км", price: "$25,000", imageUrl: "https://global.toyota/pages/news/images/2018/06/26/1600_crown/crw1806_01_s.jpg" }, { id: 2, name: "Nissan Skyline", year: 2019, mileage: "20,000 км", price: "$30,000", imageUrl: "https://www.valleyhitoyota.com/blogs/3072/wp-content/uploads/2024/07/2025_Crown_Platinum_BronzeAgeBiTone_H-1500x789_converted.webp" }, { id: 3, name: "Mazda RX-8", year: 2018, mileage: "50,000 км", price: "$18,000", imageUrl: "https://autoseu.com/wp-content/uploads/2022/10/2023-toyota-crown_100847955_h.jpg" }, { id: 4, name: "Honda Civic", year: 2021, mileage: "10,000 км", price: "$22,000", imageUrl: "https://www.toyotahawaii.com/on/demandware.static/-/Sites-Servco_master/default/dw59523e8f/images/model/Crown/360/oxygen-white/23_Crown_XLE_OxygenWhite_4.webp" }, { id: 5, name: "Subaru Impreza", year: 2017, mileage: "40,000 км", price: "$20,000", imageUrl: "https://tmna.aemassets.toyota.com/is/image/toyota/toyota/jellies/max/2025/toyotacrown/platinum/4030/2yz/36/5.png?fmt=png-alpha&wid=930&qlt=90" }, { id: 6, name: "Lexus RX", year: 2022, mileage: "5,000 км", price: "$50,000", imageUrl: "https://images.unsplash.com/photo-1592928300063-61b5e1b9e023" } ]; const itemsPerPage = 3; export default function CarImportSite() { const [searchTerm, setSearchTerm] = useState(""); const [darkMode, setDarkMode] = useState(false); const [currentPage, setCurrentPage] = useState(1); const filteredCars = carData.filter(car => car.name.toLowerCase().includes(searchTerm.toLowerCase()) ); const totalPages = Math.ceil(filteredCars.length / itemsPerPage); const displayedCars = filteredCars.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage); return (
Импорт автомобилей из-за границы
Тёмный режим setDarkMode(!darkMode)} />
setSearchTerm(e.target.value)} className="border-2 border-blue-300 p-2 rounded-lg w-full" />
{displayedCars.map(car => (

{car.name}

{car.name}

Год: {car.year} | Пробег: {car.mileage}

Цена: {car.price}

))}
Страница {currentPage} из {totalPages}
); }