Merge branch 'main' of https://git.mdnd-it.cc/Donat/SerpentRace into barni
This commit is contained in:
@@ -76,8 +76,7 @@ services:
|
|||||||
- NODE_ENV=development
|
- NODE_ENV=development
|
||||||
- VITE_API_URL=http://localhost:3000
|
- VITE_API_URL=http://localhost:3000
|
||||||
volumes:
|
volumes:
|
||||||
- ../SerpentRace_Frontend:/app
|
[]
|
||||||
- /app/node_modules
|
|
||||||
develop:
|
develop:
|
||||||
watch:
|
watch:
|
||||||
- action: sync
|
- action: sync
|
||||||
|
|||||||
@@ -57,6 +57,19 @@ const SectionContainer = ({ id, title, children }) => {
|
|||||||
|
|
||||||
const CompanyHub = () => {
|
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 (
|
return (
|
||||||
<div className=" relative min-h-screen text-white">
|
<div className=" relative min-h-screen text-white">
|
||||||
{/* Background fixed behind everything */}
|
{/* Background fixed behind everything */}
|
||||||
@@ -68,6 +81,12 @@ const CompanyHub = () => {
|
|||||||
<Navbar />
|
<Navbar />
|
||||||
|
|
||||||
<main className="flex-grow relative px-4 py-8 md:px-12 md:py-16 overflow-y-auto scroll-smooth">
|
<main className="flex-grow relative px-4 py-8 md:px-12 md:py-16 overflow-y-auto scroll-smooth">
|
||||||
|
<section
|
||||||
|
ref={sectionRef}
|
||||||
|
className={`max-w-5xl mx-auto transition-all duration-1000 ease-out ${
|
||||||
|
visible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-10"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<div className="flex justify-center gap-6 mt-8 flex-wrap">
|
<div className="flex justify-center gap-6 mt-8 flex-wrap">
|
||||||
<Card
|
<Card
|
||||||
icon={<FaBuilding />}
|
icon={<FaBuilding />}
|
||||||
@@ -216,6 +235,7 @@ const CompanyHub = () => {
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// Főoldal - Landing Page
|
// Főoldal - Landing Page
|
||||||
|
|
||||||
|
|
||||||
import { useNavigate } from "react-router-dom"
|
import { data, useNavigate } from "react-router-dom"
|
||||||
import Navbar from "../../components/Navbar/Navbar"
|
import Navbar from "../../components/Navbar/Navbar"
|
||||||
import Footer from "../../components/Footer/Footer.jsx"
|
import Footer from "../../components/Footer/Footer.jsx"
|
||||||
import Background from "../../assets/backgrounds/Background.jsx"
|
import Background from "../../assets/backgrounds/Background.jsx"
|
||||||
@@ -12,15 +12,18 @@ export default function LandingPageMain() {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const handleNavigateToPlay = () => {
|
const handleNavigateToPlay = () => {
|
||||||
navigate("/login");
|
navigate("/login", { preventScrollReset: false });
|
||||||
|
window.scrollTo(0, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleNavigateToAuth = () => {
|
const handleNavigateToAuth = () => {
|
||||||
navigate("/register");
|
navigate("/companies", { preventScrollReset: false });
|
||||||
|
window.scrollTo(0, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleNavigateToGame = () => {
|
const handleNavigateToGame = () => {
|
||||||
navigate("/home");
|
navigate("/home", { preventScrollReset: false });
|
||||||
|
window.scrollTo(0, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleNavigateToContacts = () => {
|
const handleNavigateToContacts = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user