03.01.26
This commit is contained in:
24
src/App.jsx
24
src/App.jsx
@@ -190,10 +190,11 @@ if (latestValue && prevValue) {
|
|||||||
const news = [
|
const news = [
|
||||||
{
|
{
|
||||||
type: "Forex",
|
type: "Forex",
|
||||||
label: `EUR/USD: ${latestValue?.toFixed(4)}`,
|
pair: "EUR/USD",
|
||||||
|
value: latestValue, // nombre
|
||||||
date: latestDate,
|
date: latestDate,
|
||||||
icon: TrendingUp,
|
icon: TrendingUp,
|
||||||
trendValue, // <- même logique que KPIs
|
trendValue,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// type: "Logistic",
|
// type: "Logistic",
|
||||||
@@ -537,18 +538,29 @@ export default function App() {
|
|||||||
<div
|
<div
|
||||||
key={idx}
|
key={idx}
|
||||||
className="flex justify-between items-center p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700 cursor-pointer"
|
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>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className="font-semibold">{n.type}</span>
|
<span className="font-semibold">{n.type}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="ml-6">
|
<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 && (
|
{n.trendValue !== null && (
|
||||||
<span
|
<span
|
||||||
className={`
|
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
|
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"
|
? "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>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className="text-gray-500 text-xs">{n.date}</span>
|
<span className="text-gray-500 text-xs">{n.date}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user