From 5fce4cd1c60482adc7bf1fd47001ea8a1e75228f Mon Sep 17 00:00:00 2001 From: denshooter Date: Thu, 19 Feb 2026 21:39:29 +0100 Subject: [PATCH] Add fade-in effect to hero image on load Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/components/HeroSection.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/HeroSection.tsx b/src/components/HeroSection.tsx index 61cf1c3..7193ca0 100644 --- a/src/components/HeroSection.tsx +++ b/src/components/HeroSection.tsx @@ -1,5 +1,6 @@ 'use client' +import { useState } from 'react' import { motion } from 'framer-motion' import { ChevronDown } from 'lucide-react' @@ -8,6 +9,8 @@ interface HeroSectionProps { } export default function HeroSection({ heroPhoto }: HeroSectionProps) { + const [imageLoaded, setImageLoaded] = useState(false) + return (
{/* Background */} @@ -16,7 +19,9 @@ export default function HeroSection({ heroPhoto }: HeroSectionProps) { Maria Malejka setImageLoaded(true)} />
{/* Grain overlay */}