"use client"; import { useState, useEffect } from "react"; import { motion, AnimatePresence } from "framer-motion"; import { Logo } from "./Logo"; const SOCIAL_LINKS = [ { href: "https://github.com/evandrodevbr", label: "GitHub", icon: ( ), }, { href: "https://www.linkedin.com/in/evandro-fonseca-junior-0969aa1b0/", label: "LinkedIn", icon: ( ), }, { href: "mailto:evandrofonsecajunior@gmail.com", label: "Email", icon: ( <> ), stroke: true, }, ]; const textToType = "evandro.dev.br"; export default function Hero() { const [phase, setPhase] = useState<"typing" | "idle" | "glitch" | "logo">( "typing", ); const [typedCount, setTypedCount] = useState(0); useEffect(() => { let timeout: NodeJS.Timeout; if (phase === "typing") { if (typedCount < textToType.length) { timeout = setTimeout(() => { setTypedCount((c) => c + 1); }, 120); // typing speed } else { timeout = setTimeout(() => { setPhase("idle"); }, 1200); // Wait after typing finishes } } else if (phase === "idle") { timeout = setTimeout(() => { setPhase("glitch"); }, 100); // trigger glitch } else if (phase === "glitch") { timeout = setTimeout(() => { setPhase("logo"); }, 600); // Glitch out duration } else if (phase === "logo") { timeout = setTimeout(() => { setTypedCount(0); setPhase("typing"); }, 3500); // Logo display and blink duration } return () => clearTimeout(timeout); }, [phase, typedCount]); const renderTypedText = () => { const chars = []; for (let i = 0; i < typedCount; i++) { const char = textToType[i]; if (i < 7) { chars.push( {char} , ); } else if (i === 7) { chars.push(
); chars.push( {char} , ); } else if (i < 11) { chars.push( {char} , ); } else if (i === 11) { chars.push(
); chars.push( {char} , ); } else { chars.push( {char} , ); } } // blinking cursor if (phase === "typing" || phase === "idle") { chars.push( _ , ); } return chars; }; const hour = new Date().getHours(); const greeting = hour >= 8 && hour < 12 ? "Ola! Vi seu portfolio. Podemos conversar?" : hour >= 13 && hour < 18 ? "Boa tarde! Vi seu portfolio. Podemos conversar?" : "Ola! Vi seu portfolio. Podemos conversar quando estiver disponivel?"; return (
Systems engineer available
{(phase === "typing" || phase === "idle") && ( {renderTypedText()} )} {phase === "logo" && ( )}

Engenheiro de Software especializado em aplicacoes de alta performance, interfaces de produto e sistemas criticos com Next.js, React, Tauri e arquitetura escalavel.

Iniciar projeto Download CV
{SOCIAL_LINKS.map((link) => ( {link.icon} ))}
Garuva, SC | Remote worldwide
); }