From 5722846da3cb2c84271b1bfbf1b0e27a4348f8ee Mon Sep 17 00:00:00 2001 From: magdo Date: Fri, 24 Oct 2025 19:52:11 +0200 Subject: [PATCH] To The Top --- .../src/pages/Companies/Companies.jsx | 145 ++++++++++-------- 1 file changed, 83 insertions(+), 62 deletions(-) diff --git a/SerpentRace_Frontend/src/pages/Companies/Companies.jsx b/SerpentRace_Frontend/src/pages/Companies/Companies.jsx index 0a73794b..8d64cb8c 100644 --- a/SerpentRace_Frontend/src/pages/Companies/Companies.jsx +++ b/SerpentRace_Frontend/src/pages/Companies/Companies.jsx @@ -1,4 +1,4 @@ -import React from "react" +import React, { useEffect, useRef, useState } from "react" import Navbar from "../../components/Navbar/Navbar.jsx" import Footer from "../../components/Footer/Footer.jsx" import Background from "../../assets/backgrounds/Background" @@ -56,6 +56,20 @@ const SectionContainer = ({ id, title, children }) => { } const CompanyHub = () => { + + const [visible, setVisible] = useState(false) + const sectionRef = useRef(null) + useEffect(() => { + const observer = new IntersectionObserver( + ([entry]) => { + if (entry.isIntersecting) setVisible(true) + }, + { threshold: 0.3 } + ) + if (sectionRef.current) observer.observe(sectionRef.current) + return () => observer.disconnect() + }, []) + return (
{/* Background fixed behind everything */} @@ -67,6 +81,12 @@ const CompanyHub = () => {
+
} @@ -152,68 +172,69 @@ const CompanyHub = () => {
- {/* Contact + Join Section */} -
- {/* Contact */} -
-

- Kapcsolatfelvétel cégeknek -

-
- - -