Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

502
Vistas
Configuración del widget NextJS Script TradingView

Mientras transfiero el mejor artículo de stock en mi sitio web de Jekyll a NextJS, no puedo entender cómo pasar la configuración del widget al componente Script incorporado, simplemente no muestra el widget. Aquí está el código:

 import Script from 'next/script' export default function StockSnippet({Exchange, Ticker}) { return <> <Script src="https://s3.tradingview.com/external-embedding/embed-widget-mini-symbol-overview.js"> {{"symbol": `${Exchange}:${Ticker}`, "width": "100%", "height": "100%", "locale": "en", "dateRange": "12M", "colorTheme": "light", "trendLineColor": "rgba(41, 98, 255, 1)", "underLineColor": "rgba(41, 98, 255, 0.3)", "underLineBottomColor": "rgba(41, 98, 255, 0)", "isTransparent": false, "autosize": true, "largeChartUrl": ""}} </Script> </>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Intente convertir sus datos en una cadena JSON llamando a JSON.stringify

 export default function StockSnippet({ Exchange, Ticker }) { const wrapperStyle = { width: "100%", height: "100%" } return <> <div id="tradingview-wrapper" style={wrapperStyle}> <Script id="tradingview-widget" src="https://s3.tradingview.com/external-embedding/embed-widget-mini-symbol-overview.js" onLoad={() => { document.getElementById('tradingview-wrapper').appendChild(document.getElementById('tradingview-widget')); }}> {JSON.stringify({ "symbol": `${Ticker}:${Exchange}`, "width": "100%", "height": "100%", "locale": "en", "dateRange": "12M", "colorTheme": "light", "trendLineColor": "rgba(41, 98, 255, 1)", "underLineColor": "rgba(41, 98, 255, 0.3)", "underLineBottomColor": "rgba(41, 98, 255, 0)", "isTransparent": false, "autosize": true, "largeChartUrl": "", })} </Script> </div> </> }
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda