fix: CollapseHistory: show "—" instead of "0" profit when data unavailable (#207)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1bc01c0555
commit
ff29f79d8a
1 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="subheader2">Profit</span><span class="number-small">{{ profit }}</span
|
<span class="subheader2">Profit</span><span class="number-small">{{ profit }}</span
|
||||||
><span class="caption"> $KRK</span>
|
><span v-if="profit !== '—'" class="caption"> $KRK</span>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="isSnatched">
|
<template v-if="isSnatched">
|
||||||
<div v-if="payoutKrk !== null">
|
<div v-if="payoutKrk !== null">
|
||||||
|
|
@ -62,7 +62,7 @@ const isSnatched = computed(() => props.position.snatched > 0);
|
||||||
|
|
||||||
const profit = computed(() => {
|
const profit = computed(() => {
|
||||||
if (!props.position.totalSupplyEnd) {
|
if (!props.position.totalSupplyEnd) {
|
||||||
return 0;
|
return '—';
|
||||||
}
|
}
|
||||||
return calculateClosedPositionProfit(props.position.totalSupplyInit, props.position.totalSupplyEnd, props.position.share);
|
return calculateClosedPositionProfit(props.position.totalSupplyInit, props.position.totalSupplyEnd, props.position.share);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue