Skip to content

Commit 93dac03

Browse files
authored
Update Hero.tsx
Signed-off-by: Aitor Alien <[email protected]>
1 parent dc4b87f commit 93dac03

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

src/components/Hero.tsx

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,46 @@
1-
import React from 'react';
1+
import React, { useEffect, useState } from 'react';
22
import { motion } from 'framer-motion';
33
import { Button } from '@/components/ui/button';
44
import { ScrollText, Globe, Orbit } from 'lucide-react';
55
import { Link } from 'react-router-dom';
66

77
const Hero: React.FC = () => {
8+
const [mounted, setMounted] = useState(false);
9+
10+
useEffect(() => {
11+
setMounted(true);
12+
}, []);
13+
814
const scrollToSpaces = () => {
915
const spacesSection = document.querySelector('[data-section="explore-spaces"]');
1016
if (spacesSection) spacesSection.scrollIntoView({ behavior: 'smooth' });
1117
};
1218

19+
if (!mounted) return <div className="min-h-[calc(100vh-4rem)] bg-alien-space"></div>;
20+
1321
return (
1422
<section className="relative flex flex-col items-center justify-center min-h-[calc(100vh-4rem)] py-16 overflow-hidden">
15-
{/* Fondo de estrellas eficiente */}
16-
<div className="absolute inset-0 bg-stars bg-cover bg-center opacity-40 animate-pulse-glow"></div>
23+
{/* Fondo de estrellas */}
24+
<div className="absolute inset-0 bg-stars bg-cover bg-center opacity-40"></div>
1725
<div className="absolute inset-0 bg-glow-radial"></div>
1826

1927
<div className="container relative z-10 px-4 mx-auto text-center">
2028
{/* Logo flotante */}
2129
<motion.img
2230
src="/lovable-uploads/ALogo.png"
2331
alt="AlienFlowSpaceDAO Logo"
24-
className="h-24 md:h-28 gold-glow z-20 mb-8"
32+
className="h-24 md:h-28 gold-glow z-20 mb-8 mx-auto"
2533
initial={{ scale: 0.8 }}
2634
animate={{
2735
scale: [1, 1.05, 1],
2836
rotate: [0, 2, 0],
2937
y: [0, -10, 0]
3038
}}
3139
transition={{ duration: 6, repeat: Infinity, repeatType: "reverse" }}
40+
loading="lazy"
3241
/>
3342

34-
{/* Título tipo Star Wars */}
43+
{/* Título */}
3544
<motion.h1
3645
initial={{ scale: 0.5, opacity: 0 }}
3746
animate={{ scale: 1, opacity: 1 }}
@@ -44,7 +53,7 @@ const Hero: React.FC = () => {
4453
<span className="text-alien-gold"> DAO</span>
4554
</motion.h1>
4655

47-
{/* Subtextos estilo Star Wars Crawl en verde */}
56+
{/* Crawl Star Wars */}
4857
<div className="star-wars-crawl perspective-400 relative">
4958
<motion.div
5059
className="star-wars-content readable-glow font-exo text-center text-[clamp(1rem,1.8vw,1.25rem)] md:text-[clamp(1.1rem,1.6vw,1.35rem)] text-alien-green font-semibold"
@@ -61,28 +70,28 @@ const Hero: React.FC = () => {
6170
</motion.div>
6271
</div>
6372

64-
{/* Botones dorado oscuro / texto verde claro */}
73+
{/* Botones originales */}
6574
<motion.div
6675
className="flex flex-wrap justify-center gap-4 mt-8"
6776
initial={{ opacity: 0, y: 20 }}
6877
animate={{ opacity: 1, y: 0 }}
6978
transition={{ delay: 1.5, duration: 1 }}
7079
>
7180
<Link to="/about">
72-
<Button className="bg-alien-gold-dark text-alien-green-light hover:bg-alien-green hover:text-alien-gold-dark font-nasalization px-6 sm:px-8 py-4 sm:py-5 text-sm sm:text-base rounded-full shadow-lg shadow-alien-gold-dark/40 transition-all transform hover:-translate-y-1 hover:scale-105">
81+
<Button className="bg-alien-green text-alien-gold hover:bg-alien-gold hover:text-alien-green font-nasalization px-6 sm:px-8 py-4 sm:py-5 text-sm sm:text-base rounded-full transition-colors shadow-lg">
7382
<Orbit className="mr-2 h-4 w-4" /> About Enter Portal
7483
</Button>
7584
</Link>
7685

7786
<Link to="/alien-trip">
78-
<Button className="bg-alien-gold-dark text-alien-green-light hover:bg-alien-green hover:text-alien-gold-dark font-nasalization px-6 sm:px-8 py-4 sm:py-5 text-sm sm:text-base rounded-full shadow-lg shadow-alien-gold-dark/40 transition-all transform hover:-translate-y-1 hover:scale-105">
87+
<Button className="bg-alien-green text-alien-gold hover:bg-alien-gold hover:text-alien-green font-nasalization px-6 sm:px-8 py-4 sm:py-5 text-sm sm:text-base rounded-full transition-colors shadow-lg">
7988
<ScrollText className="mr-2 h-4 w-4" /> Alientrip Manifesto
8089
</Button>
8190
</Link>
8291

8392
<Button
8493
onClick={scrollToSpaces}
85-
className="bg-alien-gold-dark text-alien-green-light hover:bg-alien-green hover:text-alien-gold-dark font-nasalization px-6 sm:px-8 py-4 sm:py-5 text-sm sm:text-base rounded-full shadow-lg shadow-alien-gold-dark/40 transition-all transform hover:-translate-y-1 hover:scale-105"
94+
className="bg-alien-green text-alien-gold hover:bg-alien-gold hover:text-alien-green font-nasalization px-6 sm:px-8 py-4 sm:py-5 text-sm sm:text-base rounded-full transition-colors shadow-lg"
8695
>
8796
<Globe className="mr-2 h-4 w-4" /> Join the Journey
8897
</Button>

0 commit comments

Comments
 (0)