|
| 1 | +import TradingViewWidget from "@/components/TradingViewWidget"; |
1 | 2 | import {Button} from "@/components/ui/button"; |
| 3 | +import { HEATMAP_WIDGET_CONFIG, MARKET_DATA_WIDGET_CONFIG, MARKET_OVERVIEW_WIDGET_CONFIG, TOP_STORIES_WIDGET_CONFIG } from "@/lib/constants"; |
2 | 4 |
|
3 | 5 | const Home = () => { |
| 6 | + |
| 7 | + const scriptUrl =`https://s3.tradingview.com/external-embedding/embed-widget-` |
4 | 8 | return ( |
5 | 9 | <div className="flex min-h-screen home-wrapper"> |
6 | | - Home |
| 10 | + <section className="grid w-full gap-8 home-section"> |
| 11 | + <div className="md:col-span-1 xl:col-span-1"> |
| 12 | + <TradingViewWidget |
| 13 | + title="Market Overview" |
| 14 | + scriptUrl={`${scriptUrl}market-overview.js`} |
| 15 | + config={MARKET_OVERVIEW_WIDGET_CONFIG} |
| 16 | + className="custom-chart" |
| 17 | + height={600} |
| 18 | + /> |
| 19 | + </div> |
| 20 | + |
| 21 | + <div className="md-col-span xl:col-span-2"> |
| 22 | + <TradingViewWidget |
| 23 | + title="Stock HeatMap" |
| 24 | + scriptUrl={`${scriptUrl}stock-heatmap.js`} |
| 25 | + config={HEATMAP_WIDGET_CONFIG} |
| 26 | + // className="custom-chart" |
| 27 | + height={600} |
| 28 | + /> |
| 29 | + </div> |
| 30 | + </section> |
| 31 | + |
| 32 | + <section className="grid w-full gap-8 home-section"> |
| 33 | + <div className="h-full md:col-span-1 xl:col-span-1"> |
| 34 | + <TradingViewWidget |
| 35 | + // title="Market Overview" |
| 36 | + scriptUrl={`${scriptUrl}timeline.js`} |
| 37 | + config={TOP_STORIES_WIDGET_CONFIG} |
| 38 | + className="custom-chart" |
| 39 | + height={600} |
| 40 | + /> |
| 41 | + </div> |
| 42 | + |
| 43 | + <div className="h-full md:col-span-1 xl:col-span-2"> |
| 44 | + <TradingViewWidget |
| 45 | + // title="Stock HeatMap" |
| 46 | + scriptUrl={`${scriptUrl}market-quotes.js`} |
| 47 | + config={MARKET_DATA_WIDGET_CONFIG} |
| 48 | + // className="custom-chart" |
| 49 | + height={600} |
| 50 | + /> |
| 51 | + </div> |
| 52 | + </section> |
7 | 53 | </div> |
8 | 54 | ) |
9 | 55 | } |
|
0 commit comments