summaryrefslogtreecommitdiff
path: root/frontend/lib/api.ts
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-06-22 15:11:51 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-06-22 15:11:51 -0700
commite66c7b9171c8c08da38120490bed15a9b877d222 (patch)
tree7a468ada2e53989c36555a42de12fe8069edbc49 /frontend/lib/api.ts
parent911765d8d1094df1baed4c3a313988e18cc31755 (diff)
feat: add NewsPage component and enable News tab
Diffstat (limited to 'frontend/lib/api.ts')
-rw-r--r--frontend/lib/api.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/frontend/lib/api.ts b/frontend/lib/api.ts
index 13c73bf..2635af5 100644
--- a/frontend/lib/api.ts
+++ b/frontend/lib/api.ts
@@ -1,4 +1,4 @@
-import type { FilingsResponse, FinancialsResponse, HistoryPoint, InsidersResponse, MarketIndex, RatiosResponse, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse } from "@/types/api";
+import type { FilingsResponse, FinancialsResponse, HistoryPoint, InsidersResponse, MarketIndex, NewsResponse, RatiosResponse, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse } from "@/types/api";
const API_BASE = (process.env.NEXT_PUBLIC_API_BASE_URL || "").trim().replace(/\/$/, "");
@@ -74,4 +74,9 @@ export const api = {
`/api/tickers/${encodeURIComponent(symbol)}/filings`
);
},
+ news(symbol: string) {
+ return request<NewsResponse>(
+ `/api/tickers/${encodeURIComponent(symbol)}/news`
+ );
+ },
};