From ab699a136169e8661b4f22fbce023ca7f033ce18 Mon Sep 17 00:00:00 2001
From: Tyler Hoang <tyler@tylerhoang.xyz>
Date: Mon, 29 Jun 2026 01:41:24 -0700
Subject: feat: update ValuationPage and valuation cards

---
 frontend/components/prism/ValuationPage.tsx | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

(limited to 'frontend/components/prism/ValuationPage.tsx')

diff --git a/frontend/components/prism/ValuationPage.tsx b/frontend/components/prism/ValuationPage.tsx
index 3a3ba27..ed8d93c 100644
--- a/frontend/components/prism/ValuationPage.tsx
+++ b/frontend/components/prism/ValuationPage.tsx
@@ -5,7 +5,7 @@ import { buildKpis } from "@/lib/overview";
 import { ValuationCard } from "@/components/prism/ValuationCard";
 import { KPIStrip } from "@/components/prism/KPIStrip";
 import { TickerHeader } from "@/components/prism/TickerHeader";
-import type { TickerOverview, ValuationResponse } from "@/types/api";
+import type { TickerOverview, ValuationResponse, WaccResponse } from "@/types/api";
 
 type ValState = "loading" | "ready" | "error";
 
@@ -18,6 +18,8 @@ type Props = {
 
 export function ValuationPage({ ticker, overview, isSaved, onToggleWatchlist }: Props) {
   const [data, setData] = useState<ValuationResponse | null>(null);
+  const [waccData, setWaccData] = useState<WaccResponse | null>(null);
+  const [seedRevenue, setSeedRevenue] = useState<number | null>(null);
   const [valState, setValState] = useState<ValState>("loading");
   const kpis = buildKpis(overview);
 
@@ -25,12 +27,19 @@ export function ValuationPage({ ticker, overview, isSaved, onToggleWatchlist }:
     let cancelled = false;
     setValState("loading");
     setData(null);
+    setWaccData(null);
+    setSeedRevenue(null);
 
-    api
-      .valuation(ticker)
-      .then((res) => {
+    Promise.all([api.valuation(ticker), api.wacc(ticker), api.financials(ticker)])
+      .then(([valuationRes, waccRes, financialsRes]) => {
         if (!cancelled) {
-          setData(res);
+          const revenueRow = financialsRes?.income?.rows?.find(
+            (r) => r.label === "Total Revenue"
+          );
+          const latestRevenue = revenueRow?.values?.[0] ?? null;
+          setData(valuationRes);
+          setWaccData(waccRes);
+          setSeedRevenue(latestRevenue);
           setValState("ready");
         }
       })
@@ -55,7 +64,7 @@ export function ValuationPage({ ticker, overview, isSaved, onToggleWatchlist }:
           <p className="psm-muted-copy">Valuation data unavailable for {ticker}.</p>
         </section>
       )}
-      {valState === "ready" && data && <ValuationCard data={data} />}
+      {valState === "ready" && data && <ValuationCard data={data} waccData={waccData} seedRevenue={seedRevenue} />}
     </>
   );
 }
-- 
cgit v1.3-2-g0d8e

