| 1 |
import React, { useState, useEffect } from "react"; |
| 2 |
import Skeleton from "react-loading-skeleton"; |
| 3 |
import "react-loading-skeleton/dist/skeleton.css"; |
| 4 |
import AdminPanel from "./components/AdminPanel"; |
| 5 |
import { createRoot } from 'react-dom/client'; |
| 6 |
|
| 7 |
// Import styles |
| 8 |
import "react-toastify/dist/ReactToastify.css"; |
| 9 |
import "./scss/dashboard.scss"; |
| 10 |
import "./scss/faq-builder/bd-faq.scss"; |
| 11 |
import "./scss/settings.scss"; |
| 12 |
import "./scss/responsive.scss"; |
| 13 |
|
| 14 |
const container = document.getElementById("betterdocs-dashboard-app"); |
| 15 |
|
| 16 |
// Add error handling for null container |
| 17 |
if (!container) { |
| 18 |
throw new Error("Failed to find the betterdocs-dashboard-app element"); |
| 19 |
} |
| 20 |
|
| 21 |
createRoot(container).render(<AdminPanel />); |
| 22 |
|