diff --git a/src/blocks/Hero/Component.tsx b/src/blocks/Hero/Component.tsx index 4b64c96..883c900 100644 --- a/src/blocks/Hero/Component.tsx +++ b/src/blocks/Hero/Component.tsx @@ -1,5 +1,5 @@ 'use client' -import React, { useState } from 'react' +import React from 'react' import { motion } from 'framer-motion' import type { Page, Media } from '../../payload-types' import Link from 'next/link' @@ -43,7 +43,6 @@ export const HeroBlock: React.FC = ({ floatingStat, whatsappNumber, }) => { - const [imageLoaded, setImageLoaded] = useState(false) const whatsappLink = whatsappNumber ? `https://wa.me/${whatsappNumber}` : '#' const heroMedia = typeof image === 'object' && image !== null ? (image as Media) : null @@ -69,10 +68,7 @@ export const HeroBlock: React.FC = ({ fill priority sizes="100vw" - onLoad={() => setImageLoaded(true)} - className={`object-cover object-center transition-all duration-1000 ${ - imageLoaded ? 'opacity-100 scale-100' : 'opacity-0 scale-105' - }`} + className="object-cover object-center" /> {/* Ciemny gradient pod spodem, by biały tekst był świetnie czytelny, a zdjęcie pozostało nasycone */}