From 75d5f0dd32b3ba99773f658b867d08661f74d806 Mon Sep 17 00:00:00 2001 From: Miguel Barra Date: Sun, 26 Jul 2026 18:01:20 -0400 Subject: [PATCH] feat(dbo-1083): imagen de open graph (opengraph-image) --- app/opengraph-image.tsx | 109 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 app/opengraph-image.tsx diff --git a/app/opengraph-image.tsx b/app/opengraph-image.tsx new file mode 100644 index 0000000..829e2f5 --- /dev/null +++ b/app/opengraph-image.tsx @@ -0,0 +1,109 @@ +import { ImageResponse } from 'next/og'; + +export const alt = 'Pulso — Dashboard de indicadores económicos de Chile'; +export const size = { width: 1200, height: 630 }; +export const contentType = 'image/png'; + +const indicators = [ + { code: 'UF', value: '$39.412,87', trend: 'up' as const, delta: '+0,03%' }, + { code: 'Dólar', value: '$963,12', trend: 'down' as const, delta: '-0,21%' }, + { code: 'Euro', value: '$1.041,55', trend: 'up' as const, delta: '+0,14%' }, + { code: 'Bitcoin', value: '$62.480.900', trend: 'up' as const, delta: '+1,86%' }, +]; + +const trendColor = { up: '#34d399', down: '#f87171' }; +const trendBg = { up: 'rgba(52, 211, 153, 0.12)', down: 'rgba(248, 113, 113, 0.12)' }; + +export default function Image() { + return new ImageResponse( + ( +
+
+
+
+ P +
+
+ Pulso +
+
+
+ Indicadores económicos de Chile en tiempo real +
+
+ +
+ {indicators.map((indicator) => ( +
+
+ {indicator.code} +
+
+ {indicator.value} +
+
+ {indicator.delta} +
+
+ ))} +
+
+ ), + { ...size } + ); +}