import { useEffect, useRef, useState } from 'react'; import { Swiper, SwiperSlide } from 'swiper/react'; import { CardBody, CardContainer, CardItem } from '../components/store/card'; import { Autoplay } from 'swiper/modules'; import Header from '../components/store/header'; import { motion } from 'framer-motion'; import 'swiper/css'; import 'swiper/css/pagination'; import 'swiper/css/scrollbar'; import 'swiper/css/autoplay'; const Store = () => { const [searchTerm, setSearchTerm] = useState(''); const swiperCover = useRef(null); const [filteredThemes, setFilteredThemes] = useState([]); const coverThemes = [ { coverImage: 'https://source.unsplash.com/random', name: 'Ocean View', description: 'Feel the ocean breeze with this theme.' }, { coverImage: 'https://source.unsplash.com/random?2', name: 'Mountain Majesty', description: 'Elevate your desktop to new heights.' }, { coverImage: 'https://source.unsplash.com/random?3', name: 'Urban Explorer', description: 'Bring the city life to your screen.' } ]; // Additional mocked themes for the grid with varied names const gridThemes = [ { image: 'https://source.unsplash.com/random', name: 'Serene Landscapes', description: 'Calm landscapes to soothe your soul.' }, { image: 'https://source.unsplash.com/random?4', name: 'Cosmic Energy', description: 'Explore the outer space.' }, { image: 'https://source.unsplash.com/random?5', name: 'Abstract Art', description: 'Artistic and abstract designs.' }, { image: 'https://source.unsplash.com/random?6', name: 'Nature’s Wonders', description: 'The beauty of nature captured in one theme.' }, { image: 'https://source.unsplash.com/random?7', name: 'Techie Vibes', description: 'For the tech enthusiasts.' }, { image: 'https://source.unsplash.com/random?8', name: 'Cafe Culture', description: 'Experience the cafe culture on your screen.' }, ]; useEffect(() => { setFilteredThemes(gridThemes.filter(theme => theme.name.toLowerCase().includes(searchTerm.toLowerCase()) )); }, [searchTerm]); return (
{ coverThemes.map((theme, index) => ( Theme Preview )) } {/* pagination */}
{filteredThemes.map((theme, index) => ( {theme.name} {theme.description} Theme Preview ))}
); }; export default Store;