Skip to content

Commit

Permalink
fix: animated text buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
ppmpreetham committed Jan 4, 2025
1 parent 3beb0c3 commit fe089fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/text.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React, { useState, useRef } from 'react';
import { pre } from '../assets/ertdfgcvb/programsJS/cube';

const AnimatedText = ({ text, className = '', customText = '', time = 1, preStyle = '' }) => {
const [animatedTitle, setAnimatedTitle] = useState(text || '');
const intervalRef = useRef(null);
const [isHovered, setIsHovered] = useState(false);

const finalClass = isHovered ? preStyle : className;
const finalClass = isHovered ? preStyle || className : className;

// Emojis work too :))
const letters = customText === '' ? 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' : customText;
Expand Down

0 comments on commit fe089fe

Please sign in to comment.