Files
ControlPatente/frontend/src/main.jsx
2026-01-29 11:46:36 -03:00

28 lines
727 B
JavaScript

import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import './i18n'
import App from './App.jsx'
// Función para remover la pantalla de carga
const removeLoadingScreen = () => {
const loadingScreen = document.getElementById('loading-screen');
if (loadingScreen) {
loadingScreen.classList.add('fade-out');
setTimeout(() => {
loadingScreen.remove();
}, 500);
}
};
// Renderizar React y remover loading screen
createRoot(document.getElementById('root')).render(
<StrictMode>
<App />
</StrictMode>,
)
// Remover loading screen cuando React esté montado
// Pequeño delay para asegurar que la UI esté lista
setTimeout(removeLoadingScreen, 100);