ui fixes
This commit is contained in:
parent
429f8cb676
commit
0728d57fb5
@ -28,8 +28,12 @@
|
|||||||
$: {
|
$: {
|
||||||
if ($stockTicker && typeof window !== "undefined") {
|
if ($stockTicker && typeof window !== "undefined") {
|
||||||
rawData = data?.getEarningsSurprise;
|
rawData = data?.getEarningsSurprise;
|
||||||
epsRatio = (
|
epsRatio =
|
||||||
((rawData?.eps - rawData?.epsPrior) / Math.abs(rawData?.epsPrior)) *
|
rawData?.epsPrior === 0
|
||||||
|
? null
|
||||||
|
: (
|
||||||
|
((rawData?.eps - rawData?.epsPrior) /
|
||||||
|
Math.abs(rawData?.epsPrior)) *
|
||||||
100
|
100
|
||||||
)?.toFixed(2);
|
)?.toFixed(2);
|
||||||
revenueRatio = (
|
revenueRatio = (
|
||||||
@ -106,11 +110,15 @@
|
|||||||
2,
|
2,
|
||||||
)}, with
|
)}, with
|
||||||
<span
|
<span
|
||||||
class="font-semibold {epsRatio > 0
|
class="font-semibold {epsRatio === null
|
||||||
? "before:content-['+'] text-[#00FC50]"
|
? 'text-white'
|
||||||
: 'text-[#FF2F1F]'}">{epsRatio}%</span
|
: epsRatio > 0
|
||||||
|
? 'text-[#00FC50]'
|
||||||
|
: 'text-[#FF2F1F]'}"
|
||||||
>
|
>
|
||||||
YoY {epsRatio < 0 ? "decline" : "growth"}.
|
{epsRatio === null ? "n/a" : `${epsRatio}%`}
|
||||||
|
</span>
|
||||||
|
YoY {epsRatio === null ? "" : epsRatio < 0 ? "decline" : "growth"}.
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user