bugfixing
This commit is contained in:
parent
5eeb7c823c
commit
9a3c5a7e46
@ -781,9 +781,7 @@ export function formatDate(dateStr) {
|
|||||||
{ unit: 'year', seconds: 31536000 },
|
{ unit: 'year', seconds: 31536000 },
|
||||||
{ unit: 'month', seconds: 2592000 },
|
{ unit: 'month', seconds: 2592000 },
|
||||||
{ unit: 'week', seconds: 604800 },
|
{ unit: 'week', seconds: 604800 },
|
||||||
{ unit: 'day', seconds: 86400 },
|
{ unit: 'day', seconds: 86400 }
|
||||||
{ unit: 'hour', seconds: 3600 },
|
|
||||||
{ unit: 'minute', seconds: 60 },
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// Determine the appropriate time interval
|
// Determine the appropriate time interval
|
||||||
@ -793,7 +791,8 @@ export function formatDate(dateStr) {
|
|||||||
return `${count} ${unit}${count === 1 ? '' : 's'} ago`;
|
return `${count} ${unit}${count === 1 ? '' : 's'} ago`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If less than a minute
|
|
||||||
|
// If less than a day, return "Just now"
|
||||||
return 'Just now';
|
return 'Just now';
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error formatting date:', error);
|
console.error('Error formatting date:', error);
|
||||||
@ -803,7 +802,6 @@ export function formatDate(dateStr) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const formatRuleValue = (rule) => {
|
export const formatRuleValue = (rule) => {
|
||||||
if (["interestIncome", "interestExpenses"].includes(rule.name)) {
|
if (["interestIncome", "interestExpenses"].includes(rule.name)) {
|
||||||
return `$${rule.value === 1000 ? `${rule.value / 1000} Bn` : `${rule.value} Mio`}`;
|
return `$${rule.value === 1000 ? `${rule.value / 1000} Bn` : `${rule.value} Mio`}`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user