2025-07-04 17:37:43 +01:00
|
|
|
import React from 'react';
|
2025-07-02 11:01:13 +01:00
|
|
|
import { RainbowThemeProvider } from './components/shared/RainbowThemeProvider';
|
2025-07-16 17:53:50 +01:00
|
|
|
import { FileContextProvider } from './contexts/FileContext';
|
2025-05-28 21:43:02 +01:00
|
|
|
import HomePage from './pages/HomePage';
|
2025-07-04 14:33:59 +01:00
|
|
|
import { useOpenedFile } from './hooks/useOpenedFile';
|
2025-07-04 17:37:43 +01:00
|
|
|
import { useBackendInitializer } from './hooks/useBackendInitializer';
|
2025-06-06 17:20:06 +01:00
|
|
|
|
|
|
|
// Import global styles
|
|
|
|
import './styles/tailwind.css';
|
|
|
|
import './index.css';
|
|
|
|
|
2025-07-01 17:42:16 +01:00
|
|
|
import { BackendHealthIndicator } from './components/BackendHealthIndicator';
|
2025-06-09 10:04:40 +01:00
|
|
|
|
2025-05-28 21:43:02 +01:00
|
|
|
export default function App() {
|
2025-07-04 14:33:59 +01:00
|
|
|
const { openedFilePath, loading: fileLoading } = useOpenedFile();
|
2025-07-04 17:37:43 +01:00
|
|
|
|
|
|
|
// Initialize backend on app startup
|
|
|
|
useBackendInitializer();
|
2025-06-09 10:04:40 +01:00
|
|
|
return (
|
2025-07-17 12:36:03 +01:00
|
|
|
<>
|
|
|
|
<BackendHealthIndicator className="absolute top-3 left-3 z-10" />
|
2025-06-09 18:38:06 +01:00
|
|
|
<RainbowThemeProvider>
|
2025-07-16 17:53:50 +01:00
|
|
|
<FileContextProvider enableUrlSync={true} enablePersistence={true}>
|
|
|
|
<HomePage />
|
|
|
|
</FileContextProvider>
|
2025-06-09 18:38:06 +01:00
|
|
|
</RainbowThemeProvider>
|
2025-07-17 12:36:03 +01:00
|
|
|
</>
|
2025-06-09 10:04:40 +01:00
|
|
|
);
|
2025-05-28 21:43:02 +01:00
|
|
|
}
|