chore: more UI fixes

This commit is contained in:
Jesse Egbosionu
2025-12-03 03:24:29 +01:00
parent c460ea27d4
commit caa4c1202f
3 changed files with 144 additions and 59 deletions
+29
View File
@@ -0,0 +1,29 @@
import { useState, useEffect } from 'react';
const names = ['👨🏿‍💼 Jesse Egbosionu', '👨🏿‍💻 jesseinit', '😎 jessewithit'];
export default function AnimatedName() {
const [currentIndex, setCurrentIndex] = useState(0);
const [isAnimating, setIsAnimating] = useState(false);
useEffect(() => {
const interval = setInterval(() => {
setIsAnimating(true);
setTimeout(() => {
setCurrentIndex((prevIndex) => (prevIndex + 1) % names.length);
setIsAnimating(false);
}, 500); // Half of animation duration for smooth transition
}, 3000); // Change name every 3 seconds
return () => clearInterval(interval);
}, []);
return (
<span className="animated-name-wrapper">
<span className={`highlight animated-name ${isAnimating ? 'fade-out' : 'fade-in'}`}>
{names[currentIndex]}
</span>
</span>
);
}