Add domain cloud
This commit is contained in:
		| @@ -64,24 +64,18 @@ if (import.meta.env.DEV) { | ||||
|     // --- MODO PRODUCCIÓN --- | ||||
|     // Exponemos la función de renderizado para el bootstrap.js | ||||
|     const renderWidgets = () => {         | ||||
|         console.log('%cReact: La función renderWidgets() ha sido EJECUTADA.', 'color: green; font-weight: bold;'); | ||||
|          | ||||
|         const widgetContainers = document.querySelectorAll('[data-elecciones-widget]'); | ||||
|  | ||||
|         console.log(`React: Se encontraron ${widgetContainers.length} contenedores con el atributo [data-elecciones-widget].`); | ||||
|  | ||||
|         if (widgetContainers.length === 0) { | ||||
|             console.warn('React: ADVERTENCIA - No se encontró ningún elemento en el DOM para renderizar un widget. Verifica que el HTML contenga <div data-elecciones-widget="...">.'); | ||||
|         } | ||||
|  | ||||
|         widgetContainers.forEach(container => { | ||||
|             const widgetName = (container as HTMLElement).dataset.eleccionesWidget; | ||||
|             console.log(`React: Procesando contenedor para el widget: "${widgetName}"`); | ||||
|              | ||||
|             if (widgetName && WIDGET_MAP[widgetName]) { | ||||
|                 const WidgetComponent = WIDGET_MAP[widgetName]; | ||||
|                 const root = ReactDOM.createRoot(container); | ||||
|                 console.log(`React: Renderizando el widget "${widgetName}" en el contenedor.`); | ||||
|                 root.render( | ||||
|                     <React.StrictMode> | ||||
|                         <QueryClientProvider client={queryClient}> | ||||
| @@ -98,5 +92,4 @@ if (import.meta.env.DEV) { | ||||
|     (window as any).EleccionesWidgets = { | ||||
|         render: renderWidgets | ||||
|     }; | ||||
|     console.log('React: El objeto EleccionesWidgets ha sido asignado a window.'); | ||||
| } | ||||
| @@ -45,7 +45,8 @@ builder.Services.AddCors(options => | ||||
|                               "http://localhost:5174", | ||||
|                               "http://192.168.5.128:8700", | ||||
|                               "https://www.eldia.com", | ||||
|                               "https://extras.eldia.com" | ||||
|                               "https://extras.eldia.com", | ||||
|                               "https://eldia.mustang.cloud" | ||||
|                           ) | ||||
|                           .AllowAnyHeader() | ||||
|                           .AllowAnyMethod(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user