2025-08-01 08:00:35 +05:30
|
|
|
import React from 'react';
|
2025-08-11 01:38:33 +05:30
|
|
|
import { createRoot } from 'react-dom/client';
|
2025-08-01 08:00:35 +05:30
|
|
|
import Dashboard from './pages/Dashboard';
|
|
|
|
import Settings from './pages/Settings';
|
2025-08-11 01:56:57 +05:30
|
|
|
import './pages/Dashboard.css';
|
2025-08-01 08:00:35 +05:30
|
|
|
|
2025-08-11 01:56:57 +05:30
|
|
|
// Main App component for the dashboard page
|
2025-08-01 08:00:35 +05:30
|
|
|
export default function App() {
|
2025-08-11 01:56:57 +05:30
|
|
|
return <Dashboard />;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Posts page component
|
|
|
|
function PostsApp() {
|
|
|
|
return (
|
|
|
|
<div className="helix-page">
|
|
|
|
<h1>Posts Management</h1>
|
|
|
|
<p>Posts management interface will be implemented here.</p>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Users page component
|
|
|
|
function UsersApp() {
|
2025-08-11 01:38:33 +05:30
|
|
|
return (
|
2025-08-11 01:56:57 +05:30
|
|
|
<div className="helix-page">
|
|
|
|
<h1>Users Management</h1>
|
|
|
|
<p>Users management interface will be implemented here.</p>
|
|
|
|
</div>
|
2025-08-11 01:38:33 +05:30
|
|
|
);
|
2025-08-01 08:00:35 +05:30
|
|
|
}
|
2025-08-11 01:38:33 +05:30
|
|
|
|
|
|
|
// Mount components based on container element
|
|
|
|
document.addEventListener( 'DOMContentLoaded', function () {
|
|
|
|
// Main Helix app
|
|
|
|
const helixRoot = document.getElementById( 'helix-root' );
|
|
|
|
if ( helixRoot ) {
|
|
|
|
const root = createRoot( helixRoot );
|
|
|
|
root.render( <App /> );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Settings page
|
|
|
|
const settingsRoot = document.getElementById( 'helix-settings-root' );
|
|
|
|
if ( settingsRoot ) {
|
|
|
|
const root = createRoot( settingsRoot );
|
|
|
|
root.render( <Settings /> );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Posts page
|
|
|
|
const postsRoot = document.getElementById( 'helix-posts-root' );
|
|
|
|
if ( postsRoot ) {
|
|
|
|
const root = createRoot( postsRoot );
|
2025-08-11 01:56:57 +05:30
|
|
|
root.render( <PostsApp /> );
|
2025-08-11 01:38:33 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
// Users page
|
|
|
|
const usersRoot = document.getElementById( 'helix-users-root' );
|
|
|
|
if ( usersRoot ) {
|
|
|
|
const root = createRoot( usersRoot );
|
2025-08-11 01:56:57 +05:30
|
|
|
root.render( <UsersApp /> );
|
2025-08-11 01:38:33 +05:30
|
|
|
}
|
|
|
|
} );
|