fixed news

This commit is contained in:
2025-08-04 00:10:03 +05:30
parent 511bbb87b4
commit b6041e82bb
7 changed files with 233 additions and 25 deletions

View File

@@ -0,0 +1,24 @@
import React from 'react';
interface NewsMarqueeProps {
titles: string[];
}
export const NewsMarquee: React.FC<NewsMarqueeProps> = ({ titles }) => {
if (titles.length === 0) {
return null;
}
// Join all titles with a separator and duplicate for seamless looping
const marqueeText = titles.join(' --- ') + ' --- ' + titles.join(' --- ');
return (
<div className="fixed bottom-0 z-40 h-10 left-0 w-full overflow-hidden bg-gray-900 text-yellow-400 py-2 border-t-2 border-yellow-500">
<div className="absolute whitespace-nowrap animate-marquee z-50">
<span className="text-lg font-bold px-4">
{marqueeText}
</span>
</div>
</div>
);
};