"use client" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { TrendingUp, TrendingDown, Star } from "lucide-react" interface StockHeaderProps { symbol: string activeTab: string onTabChange: (tab: string) => void } export function StockHeader({ symbol, activeTab, onTabChange }: StockHeaderProps) { // Mock data - in real app this would come from an API const stockData = { TSLA: { name: "Tesla, Inc.", symbol: "TSLA", exchange: "NASDAQ", price: 423.39, afterHoursPrice: 417.13, change: 18.4, changePercent: 4.38, afterHoursChange: -6.26, afterHoursChangePercent: -1.48, lastUpdate: "At close: Sep 25, 4:00 PM EDT", afterHoursUpdate: "After hours: Sep 26, 6:08 AM EDT", }, } const stock = stockData[symbol as keyof typeof stockData] || stockData.TSLA const isPositive = stock.change > 0 const isAfterHoursPositive = stock.afterHoursChange > 0 const tabs = [ { id: "overview", label: "Overview" }, { id: "historical", label: "Historical Data" }, { id: "financials", label: "Financials" }, { id: "earnings", label: "Earnings" }, { id: "research", label: "Research" }, ] return (
{stock.lastUpdate}
{stock.afterHoursUpdate}