This commit is contained in:
2026-01-03 18:30:30 +01:00
parent 12d719aa66
commit 3f0df01f0f

View File

@@ -190,10 +190,11 @@ if (latestValue && prevValue) {
const news = [
{
type: "Forex",
label: `EUR/USD: ${latestValue?.toFixed(4)}`,
pair: "EUR/USD",
value: latestValue, // nombre
date: latestDate,
icon: TrendingUp,
trendValue, // <- même logique que KPIs
trendValue,
},
// {
// type: "Logistic",
@@ -537,18 +538,29 @@ export default function App() {
<div
key={idx}
className="flex justify-between items-center p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700 cursor-pointer"
onClick={() => openInTryton('currency.currency', 2, ["form"])}
onClick={() => openInTryton("currency.currency", 2, ["form"])}
>
<div>
<div className="flex items-center gap-2">
<span className="font-semibold">{n.type}</span>
</div>
<div className="ml-6">
<span style={{ color: n.color }}>{n.label}</span>
{/* PAIRE */}
<div className="text-sm text-gray-400">
{n.pair}
</div>
{/* VALEUR */}
<div className="text-3xl font-bold text-gray-500">
{n.value?.toFixed(4)}
</div>
{/* TREND */}
{n.trendValue !== null && (
<span
className={`
ml-2 px-2 py-0.5 text-xs font-semibold rounded-md border
inline-block mt-1 px-2 py-0.5 text-xs font-semibold rounded-md border
${
n.trendValue >= 0
? "bg-green-50 text-green-700 border-green-200 dark:bg-green-900/30 dark:text-green-400 dark:border-green-800"
@@ -562,10 +574,12 @@ export default function App() {
)}
</div>
</div>
<div className="flex items-center gap-2">
<span className="text-gray-500 text-xs">{n.date}</span>
</div>
</div>
);
})}
</div>