Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions components/search-results-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import {
} from '@/components/ui/carousel'
import { useEffect, useState } from 'react'
import { PlusCircle } from 'lucide-react'
import { motion } from 'framer-motion'
import 'glassmorphic/glassmorphic.css'

interface SearchResultsImageSectionProps {
images: string[]
Expand Down Expand Up @@ -66,11 +64,9 @@ export const SearchResultsImageSection: React.FC<
{images.slice(0, 4).map((image: any, index: number) => (
<Dialog key={index}>
<DialogTrigger asChild>
<motion.div
className="w-[calc(50%-0.5rem)] md:w-[calc(25%-0.5rem)] aspect-video cursor-pointer relative glassmorphic"
<div
className="w-[calc(50%-0.5rem)] md:w-[calc(25%-0.5rem)] aspect-video cursor-pointer relative"
onClick={() => setSelectedIndex(index)}
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
>
<Card className="flex-1 h-full">
<CardContent className="p-2 h-full w-full">
Expand All @@ -93,9 +89,9 @@ export const SearchResultsImageSection: React.FC<
<PlusCircle size={24} />
</div>
)}
</motion.div>
</div>
</DialogTrigger>
<DialogContent className="sm:max-w-3xl max-h-[80vh] overflow-auto glassmorphic">
<DialogContent className="sm:max-w-3xl max-h-[80vh] overflow-auto">
<DialogHeader>
<DialogTitle>Search Images</DialogTitle>
<DialogDescription className="text-sm">{query}</DialogDescription>
Expand Down