import React, { useState, useEffect } from 'react'; import { BrowserRouter, Routes, Route } from 'react-router-dom'; import CircularProgress from '@mui/material/CircularProgress'; import logo from './Icons/settings-2.svg'; import './App.css'; import IntialSetting from './Components/IntialSetting.js'; import AiPage from './Components/AiPage.js'; function App() { return ( } /> } /> ); } function Home() { const [showSettings, setShowSettings] = useState(false); const [initializing, setInitializing] = useState(false); // This callback is passed to IntialSetting and called when the user clicks Save. // It changes the underlying header content to the initializing state. const handleInitializationStart = () => { setInitializing(true); }; return (
{initializing ? ( <>

Initializing the app. This may take a few minutes...

) : ( <> logo setShowSettings(true)} style={{ cursor: 'pointer' }} />

Enter the settings to proceed

)} {/* Always render the settings modal if showSettings is true */} {showSettings && ( )}
); } export default App;