53 lines
2.1 KiB
TypeScript
53 lines
2.1 KiB
TypeScript
import React from 'react'
|
|
import TradingViewWidget from "@/components/TradingViewWidget";
|
|
import {MARKET_DATA_WIDGET_CONFIG, MARKET_OVERVIEW_WIDGET_CONFIG, TOP_STORIES_WIDGET_CONFIG} from "@/lib/constants";
|
|
|
|
const Home = () => {
|
|
const scriptUrl = `https://s3.tradingview.com/external-embedding/embed-widget-`;
|
|
return (
|
|
<div className="flex min-h-screen home-wrapper">
|
|
<section className="grid w-full gap-8 home-section">
|
|
<div className="md:col-span-1 xl:col-span-1">
|
|
<TradingViewWidget
|
|
title="Market Overview"
|
|
scriptUrl={`${scriptUrl}market-overview.js`}
|
|
config={MARKET_OVERVIEW_WIDGET_CONFIG}
|
|
className="custom-chart"
|
|
height={600}
|
|
/>
|
|
|
|
</div>
|
|
<div className="md:col-span-1 xl:col-span-2">
|
|
<TradingViewWidget
|
|
title="Stock Heatmap"
|
|
scriptUrl={`${scriptUrl}stock-heatmap.js`}
|
|
config={MARKET_OVERVIEW_WIDGET_CONFIG}
|
|
className="custom-chart"
|
|
height={600}
|
|
/>
|
|
</div>
|
|
</section>
|
|
<section className="grid w-full gap-8 home-section">
|
|
<div className="md:col-span-1 xl:col-span-2">
|
|
<TradingViewWidget
|
|
title="Market Quotes"
|
|
scriptUrl={`${scriptUrl}market-quotes.js`}
|
|
config={MARKET_DATA_WIDGET_CONFIG}
|
|
height={600}
|
|
/>
|
|
</div>
|
|
<div className="md:col-span-1 xl:col-span-1">
|
|
<TradingViewWidget
|
|
title="Top Stories"
|
|
scriptUrl={`${scriptUrl}timeline.js`}
|
|
config={TOP_STORIES_WIDGET_CONFIG}
|
|
height={600}
|
|
/>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
)
|
|
}
|
|
export default Home
|