import App from "./App";
import React from 'react';
import { HashRouter } from 'react-router-dom';
import { createRoot } from 'react-dom/client'; // Import createRoot
window.addEventListener('DOMContentLoaded', (event) => {
    const dashboardElement = document.getElementById('wpcts_dashboard');
    if (dashboardElement) {
        const root = createRoot(dashboardElement); // Create a root for React
        root.render(<HashRouter><App /></HashRouter>); // Use root to render the component
    }
});