diff --git a/src/components/sections/product/ProductMediaCards.tsx b/src/components/sections/product/ProductMediaCards.tsx index 7ae3a37..714066b 100644 --- a/src/components/sections/product/ProductMediaCards.tsx +++ b/src/components/sections/product/ProductMediaCards.tsx @@ -1,10 +1,16 @@ -import { ArrowUpRight, Loader2 } from "lucide-react"; import { motion } from "motion/react"; import Button from "@/components/ui/Button"; import TextAnimation from "@/components/ui/TextAnimation"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; import GridOrCarousel from "@/components/ui/GridOrCarousel"; -import useProducts from "@/hooks/useProducts"; +import ImageOrVideo from "@/components/ui/ImageOrVideo"; + +type Product = { + name: string; + price: string; + imageSrc: string; + description?: string; + onClick?: () => void; +}; type ProductMediaCardsProps = { tag: string; @@ -12,12 +18,7 @@ type ProductMediaCardsProps = { description: string; primaryButton?: { text: string; href: string }; secondaryButton?: { text: string; href: string }; - products?: { - name: string; - price: string; - imageSrc: string; - onClick?: () => void; - }[]; + products?: Product[]; }; const ProductMediaCards = ({ @@ -26,35 +27,10 @@ const ProductMediaCards = ({ description, primaryButton, secondaryButton, - products: productsProp, + products = [], }: ProductMediaCardsProps) => { - const { products: fetchedProducts, isLoading } = useProducts(); - const isFromApi = fetchedProducts.length > 0; - const products = isFromApi - ? fetchedProducts.map((p) => ({ - name: p.name, - price: p.price, - imageSrc: p.imageSrc, - onClick: p.onProductClick, - })) - : productsProp; - - if (isLoading && !productsProp) { - return ( -
-
- -
-
- ); - } - - if (!products || products.length === 0) { - return null; - } - return ( -
+
{tag} @@ -87,28 +63,35 @@ const ProductMediaCards = ({ viewport={{ once: true, margin: "-15%" }} transition={{ duration: 0.6, ease: "easeOut" }} > - - {products.map((product) => ( - +
))} @@ -117,4 +100,4 @@ const ProductMediaCards = ({ ); }; -export default ProductMediaCards; +export default ProductMediaCards; \ No newline at end of file diff --git a/src/index.css b/src/index.css index a349261..ccc5321 100644 --- a/src/index.css +++ b/src/index.css @@ -3,6 +3,12 @@ @import "./styles/masks.css"; @import "./styles/animations.css"; +@layer utilities { + .perspective-1000 { + perspective: 1000px; + } +} + :root { /* @colorThemes/lightTheme/grayBlueAccent */ --background: #fbfaff; @@ -177,4 +183,4 @@ h6 { radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--color-accent) 15%, transparent) 0%, transparent 40%), var(--color-secondary-cta); box-shadow: 2.10837px 3.16256px 9.48767px color-mix(in srgb, var(--color-accent) 10%, transparent); -} +} \ No newline at end of file