diff --git a/src/components/AboutUs-section/AboutUs.jsx b/src/components/AboutUs-section/AboutUs.jsx index 218cdebe..b6763aa3 100644 --- a/src/components/AboutUs-section/AboutUs.jsx +++ b/src/components/AboutUs-section/AboutUs.jsx @@ -1,18 +1,59 @@ +import { useState } from "react"; import rentBoardImg from "../.././assets/Images/rent-board.png"; import "./AboutUs-section.css"; import Lottie from "lottie-react"; import rent from "./rent.json"; const AboutUs = () => { + const [gradientStyle, setGradientStyle] = useState({}); + + // Function to handle mouse movement and update gradient + const handleMouseMove = (e) => { + const { offsetX, offsetY, target } = e.nativeEvent; + const { clientWidth, clientHeight } = target; + + // Calculate percentage position of the mouse within the card + const xPercent = (offsetX / clientWidth) * 100; + const yPercent = (offsetY / clientHeight) * 100; + + // Set radial gradient color based on mouse position + setGradientStyle({ + background: `radial-gradient(circle at ${xPercent}% ${yPercent}%, #FFB74D, #FFAB91, #FFF9C4)`, + }); + }; + + // Reset gradient when mouse leaves the section + const handleMouseLeave = () => { + setGradientStyle({ + background: "#EBB4B6", // Default background color (soft mint) + }); + }; + return (
- Rentalog is a web application that makes it easy for landlords to + + About Us + +
+ Rentalog is a web application that makes it easy for landlords to manage their rental properties. With Rentalog, landlords can keep track of important information about their renters, including their names, addresses, and rental payment history. This information is @@ -31,7 +72,6 @@ const AboutUs = () => { smoothly.