"use client"; import { heatmapData, newsData, winnerMovers, loserMovers, markets, earningsCalendar, } from "@/app/MockData/MockData"; import HomepageModule from "./HomepageModuleCard"; import PortfolioChart, { AreaSeriesPartialOptionsWithData, LineSeriesPartialOptionsWithData, } from "../charts/Chart"; import MarketHeatmap from "../charts/MarketHeatmap"; import { Button } from "../ui/button"; import { ArrowRight } from "lucide-react"; import { NewsTable } from "../charts/news/NewsTable"; import { newsColumns } from "../charts/news/newsColumns"; import Chart from "../charts/Chart"; import { LineData, LineStyle, LineType, WhitespaceData, } from "lightweight-charts"; import { cn, getIntervalPrice, getLastPrice, getPercentDifference, getPriceDifference, globalColors, smaFunc, } from "@/lib/utils"; import { seriesOne } from "@/app/MockData/seriesOne"; import { seriesThree } from "@/app/MockData/seriesThree"; import { seriesFive } from "@/app/MockData/seriesFive"; import { useState } from "react"; import { Badge } from "../ui/badge"; import { ResponsiveTimeRange } from "@nivo/calendar"; import CalendarSquares from "../charts/CalendarSquares"; export const PortfolioModule = () => { const portfolioLine: LineSeriesPartialOptionsWithData = { type: "line", data: seriesThree, color: "white", lineType: LineType.Curved, }; const indexLine: LineSeriesPartialOptionsWithData = { type: "line", data: seriesFive, color: globalColors.yellow, lineType: LineType.Curved, }; return ( $34,120.87 2W 1M YTD ^10.0% $3,412.09 Go to Portfolio ); }; export const NewsModule = () => { return ( ); }; export const HeatmapModule = () => { return ( ); }; export const MoversModule = () => { return ( Gainers {winnerMovers.map((item) => ( {item.symbol} {item.stockPrice} +{item.percentChange}% ))} Losers {loserMovers.map((item) => ( {item.symbol} {item.stockPrice} {item.percentChange}% ))} ); }; export const MarketsModule = () => { const [selectedMarket, setSelectedMarket] = useState({ symbol: "S&P 500", symbolName: "SPDR S&P 500 ETF Trust", symbolUrl: "https://...", chart: seriesOne, }); const sp500IndexLine: LineSeriesPartialOptionsWithData = { type: "line", data: selectedMarket.chart, color: "white", lineType: LineType.Curved, priceLineVisible: false, }; const sma5Line: LineSeriesPartialOptionsWithData = { type: "line", data: smaFunc(selectedMarket.chart, 20), color: globalColors.yellow, lineType: LineType.Curved, priceLineVisible: false, }; return ( {markets.map((marketItem) => ( {marketItem.symbol} {getLastPrice(marketItem.chart)} 0 ? "text-green-500" : "text-red-500", "text-sm w-10 text-right 2xl:w-12" )} > {getPriceDifference(marketItem.chart, 1)} 0 ? "positive" : "negative" } > {getPercentDifference(marketItem.chart, 1) + "%"} ))} S&P 500 ); }; export const EarningsModule = () => { return ( ); }; export const DocumentsModule = () => { return ; }; export const IndicatorsModule = () => { return ; }; export const ForexAndBondsModule = () => { return ; };