news widget redesign 7

This commit is contained in:
alma 2025-04-15 12:41:13 +02:00
parent 2604e94912
commit dfa8172f32

View File

@ -99,14 +99,14 @@ export function News() {
{error ? (
<p className="text-center text-red-500">{error}</p>
) : (
<div className="space-y-1.5 max-h-[calc(100vh-12rem)] overflow-y-auto pr-1 scrollbar-thin scrollbar-thumb-gray-200 scrollbar-track-transparent">
<div className="space-y-1.5 max-h-[400px] overflow-y-auto pr-1 scrollbar-thin scrollbar-thumb-gray-200 scrollbar-track-transparent">
{news.length === 0 ? (
<p className="text-center text-gray-500">No news available</p>
) : (
news.map((item) => (
<div
key={item.id}
className="p-1.5 hover:bg-gray-50/50 rounded-lg transition-colors cursor-pointer border border-gray-100 shadow-sm"
className="p-2 hover:bg-gray-50/50 rounded-lg transition-colors cursor-pointer border border-gray-100 shadow-sm"
onClick={() => window.open(item.url, '_blank')}
>
<div className="flex items-center justify-between mb-1">