summaryrefslogtreecommitdiff
path: root/frontend/components/prism/ValuationOverviewCard.tsx
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-06-29 01:41:24 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-06-29 01:41:24 -0700
commitab699a136169e8661b4f22fbce023ca7f033ce18 (patch)
tree86d898d86ff917b7ecffc1db7b1e73581fe3b1fb /frontend/components/prism/ValuationOverviewCard.tsx
parentdfec7587305fee59f8304000994ca16a495f7389 (diff)
feat: update ValuationPage and valuation cards
Diffstat (limited to 'frontend/components/prism/ValuationOverviewCard.tsx')
-rw-r--r--frontend/components/prism/ValuationOverviewCard.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/frontend/components/prism/ValuationOverviewCard.tsx b/frontend/components/prism/ValuationOverviewCard.tsx
index 9e59787..a881c72 100644
--- a/frontend/components/prism/ValuationOverviewCard.tsx
+++ b/frontend/components/prism/ValuationOverviewCard.tsx
@@ -1,5 +1,6 @@
import type { TickerOverview, ValuationResponse } from "@/types/api";
import { fmtCurrency, fmtLarge, fmtNumber, fmtPct } from "@/lib/format";
+import { CurrencyWarning } from "./CurrencyWarning";
type ValState = "idle" | "loading" | "ready" | "error";
@@ -11,9 +12,9 @@ type Props = {
export function ValuationOverviewCard({ overview, valuation, valState }: Props) {
const rows = [
- { label: "Market Cap", value: fmtLarge(overview.stats.market_cap), missing: overview.stats.market_cap == null },
+ { label: "Market Cap", value: fmtLarge(overview.stats.market_cap, overview.currency), missing: overview.stats.market_cap == null },
{ label: "P/E TTM", value: overview.stats.trailing_pe == null ? "-" : `${fmtNumber(overview.stats.trailing_pe)}x`, missing: overview.stats.trailing_pe == null },
- { label: "EPS TTM", value: fmtCurrency(overview.stats.trailing_eps), missing: overview.stats.trailing_eps == null },
+ { label: "EPS TTM", value: fmtCurrency(overview.stats.trailing_eps, 2, overview.currency), missing: overview.stats.trailing_eps == null },
{ label: "P/B", value: overview.ratios.price_to_book == null ? "-" : `${fmtNumber(overview.ratios.price_to_book)}x`, missing: overview.ratios.price_to_book == null },
{ label: "P/S", value: overview.ratios.price_to_sales == null ? "-" : `${fmtNumber(overview.ratios.price_to_sales)}x`, missing: overview.ratios.price_to_sales == null },
{ label: "EV/Sales", value: overview.ratios.ev_to_sales == null ? "-" : `${fmtNumber(overview.ratios.ev_to_sales)}x`, missing: overview.ratios.ev_to_sales == null },
@@ -30,6 +31,7 @@ export function ValuationOverviewCard({ overview, valuation, valState }: Props)
<div>
<div className="psm-eyebrow">Valuation</div>
<h2 className="psm-card-title">Valuation</h2>
+ <CurrencyWarning warning={overview.currency_warning} />
</div>
</div>
{visible.length > 0 && (
@@ -63,7 +65,7 @@ export function ValuationOverviewCard({ overview, valuation, valState }: Props)
<div className="psm-stat-list">
<div className="psm-stat-row">
<span className="psm-stat-label">DCF Intrinsic Value</span>
- <span className="psm-stat-value">{fmtCurrency(dcf.intrinsic_value_per_share)}</span>
+ <span className="psm-stat-value">{fmtCurrency(dcf.intrinsic_value_per_share, 2, valuation?.currency ?? overview.currency)}</span>
</div>
{dcf.growth_rate_used != null && (
<div className="psm-stat-row">