fix(classiques): reduce stops marquee scroll speed by 60% (duration 25s)

This commit is contained in:
mathis committed 2026-08-30 23:46:54 +02:00
1 parent 8449f502a4
commit 647ec37d99
3 files changed
+6 -2

No files matched your search

+4 -2
View File
@@ -1,11 +1,13 @@
import React, { useRef, useState, useEffect } from 'react';
import './MarqueeText.css';
const MarqueeText = ({ text, className, style }) => {
const MarqueeText = ({ text, className, style, duration = '10s' }) => {
const containerRef = useRef(null);
const textRef = useRef(null);
const [isOverflowing, setIsOverflowing] = useState(false);
const formattedDuration = typeof duration === 'number' ? `${duration}s` : duration;
useEffect(() => {
const checkOverflow = () => {
if (containerRef.current && textRef.current) {
@@ -24,7 +26,7 @@ const MarqueeText = ({ text, className, style }) => {
ref={textRef}
style={{
display: 'inline-block',
animation: isOverflowing ? 'marquee-scroll 10s linear infinite' : 'none',
animation: isOverflowing ? `marquee-scroll ${formattedDuration} linear infinite` : 'none',
paddingLeft: isOverflowing ? '100%' : '0',
fontSize: 'inherit',
fontWeight: 'inherit',