summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--frontend/app/page.tsx20
-rw-r--r--frontend/next-env.d.ts2
3 files changed, 18 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 6e3fa68..c859b86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@ out/
dist/
*.tsbuildinfo
.DS_Store
+.superpowers/
diff --git a/frontend/app/page.tsx b/frontend/app/page.tsx
index 013b93d..44428aa 100644
--- a/frontend/app/page.tsx
+++ b/frontend/app/page.tsx
@@ -472,6 +472,16 @@ function ProfileCard({ overview }: { overview: TickerOverview }) {
function ShortInterestCard({ overview }: { overview: TickerOverview }) {
const short = overview.short_interest;
+ const items = [
+ { label: "Short Float", value: fmtPct(short.short_percent_of_float), missing: short.short_percent_of_float == null },
+ { label: "Days Cover", value: fmtNumber(short.short_ratio), missing: short.short_ratio == null },
+ { label: "Shares Short", value: fmtNumber(short.shares_short, 0), missing: short.shares_short == null },
+ { label: "Prior Delta", value: fmtPct(short.shares_short_delta_pct, 1, true), missing: short.shares_short_delta_pct == null }
+ ];
+ const visibleItems = items.filter((i) => !i.missing);
+ if (!visibleItems.length) return null;
+ const suppressed = items.length - visibleItems.length;
+
return (
<section className="psm-card">
<div className="psm-card-head">
@@ -481,11 +491,13 @@ function ShortInterestCard({ overview }: { overview: TickerOverview }) {
</div>
</div>
<div className="psm-detail-grid">
- <DetailItem label="Short Float" value={fmtPct(short.short_percent_of_float)} missing={short.short_percent_of_float == null} />
- <DetailItem label="Days Cover" value={fmtNumber(short.short_ratio)} missing={short.short_ratio == null} />
- <DetailItem label="Shares Short" value={fmtNumber(short.shares_short, 0)} missing={short.shares_short == null} />
- <DetailItem label="Prior Delta" value={fmtPct(short.shares_short_delta_pct, 1, true)} missing={short.shares_short_delta_pct == null} />
+ {visibleItems.map((item) => (
+ <DetailItem key={item.label} label={item.label} value={item.value} missing={false} />
+ ))}
</div>
+ {suppressed > 0 && (
+ <p className="psm-muted-copy" style={{ marginTop: "var(--sp-3)" }}>ยท Short interest data incomplete</p>
+ )}
</section>
);
}
diff --git a/frontend/next-env.d.ts b/frontend/next-env.d.ts
index 9edff1c..c4b7818 100644
--- a/frontend/next-env.d.ts
+++ b/frontend/next-env.d.ts
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
-import "./.next/types/routes.d.ts";
+import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.