Files
investor-flow/app/src/components/MobileTabNav.tsx
T
Investor Flow Build 5b9f770aa4
CI / Test & Type-Check (push) Canceled after 0s
Phase 5: alert subscriptions UI + multiple watchlists + queue fixes
UI:
- /alerts page: event history with acknowledge, subscription create/manage with toggle
- /admin/smtp: SMTP config form (host, port, auth, test)
- Watchlist sidebar: dropdown selector for multiple watchlists, create/delete
- Sidebar: alerts count badge, SMTP link under admin
- Mobile tab nav: alerts tab added
- Client trpc.ts: all new API methods + types

Backend:
- watchlists.listByWatchlist procedure + listSymbolsByWatchlist repo fn
- yfinance min-interval 1500->2000ms to reduce Edge 429s
- Fixed e.date.slice error in yfinance-adjustments with typeof guard
- Removed defunct BITF from watchlist+queue
- Cleared 83 failed + 12 backoff queue jobs

Docs:
- FUNCTIONAL_DESIGN.md: alerts + multiple watchlists + SMTP documented
- TECH_DESIGN.md: new modules, tRPC procs, routes updated
2026-07-23 20:51:47 -04:00

52 lines
1.6 KiB
TypeScript

"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
/**
* Mobile tab navigation bar.
* Replaces the sidebar on screens <768px.
* Displays icon + label for each section; active tab highlighted with accent color (#4f8cff).
*/
interface TabItem {
label: string;
href: string;
icon: string;
}
const TABS: TabItem[] = [
{ label: "Overview", href: "/", icon: "📊" },
{ label: "Filings", href: "/filings", icon: "📄" },
{ label: "Options", href: "/options-dd", icon: "🔮" },
{ label: "Alerts", href: "/alerts", icon: "🔔" },
{ label: "Execution", href: "/execution", icon: "⚡" },
{ label: "Trade Plan", href: "/trade-plan", icon: "📋" },
{ label: "Settings", href: "/settings", icon: "⚙️" },
];
export function MobileTabNav() {
const pathname = usePathname();
return (
<nav className="flex md:hidden border-t border-line-strong bg-surface-raised">
{TABS.map((tab) => {
const isActive = pathname === tab.href;
return (
<Link
key={tab.href}
href={tab.href}
className={`flex-1 flex flex-col items-center justify-center py-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-inset ${
isActive
? "text-accent border-b-2 border-b-accent"
: "text-fg-muted hover:text-fg"
}`}
>
<span className="text-base">{tab.icon}</span>
<span className="text-[10px] mt-0.5">{tab.label}</span>
</Link>
);
})}
</nav>
);
}