21 lines
476 B
JavaScript
21 lines
476 B
JavaScript
import React from "react";
|
|
|
|
function ChartPage({ symbol }) {
|
|
const tvSymbol = symbol || "NSE:RELIANCE";
|
|
|
|
const url = `https://www.tradingview.com/chart/?symbol=${tvSymbol}`;
|
|
|
|
return (
|
|
<div style={{ width: "100%", height: "600px", marginTop: "20px" }}>
|
|
<iframe
|
|
title="TradingView Chart"
|
|
src={url}
|
|
width="100%"
|
|
height="100%"
|
|
frameBorder="0"
|
|
></iframe>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default ChartPage; |