mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
Add loading indicator for admin asset initialization
Introduced a "loading" div to indicate when admin assets are being fetched. Updated rendering logic and styles in related components to account for this state. Prepared groundwork for potential view transitions.
This commit is contained in:
@@ -10,7 +10,10 @@ function ClientApp() {
|
||||
|
||||
// Render the app
|
||||
const rootElement = document.getElementById("app")!;
|
||||
if (!rootElement.innerHTML) {
|
||||
const shouldRender =
|
||||
!rootElement.innerHTML ||
|
||||
(rootElement.childElementCount === 1 && rootElement.firstElementChild?.id === "loading");
|
||||
if (shouldRender) {
|
||||
const root = ReactDOM.createRoot(rootElement);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
|
||||
Reference in New Issue
Block a user