Spaces:
Running
Running
Update App.tsx
Browse files
App.tsx
CHANGED
|
@@ -23,6 +23,7 @@ import AIBuilderModal from './components/AIBuilderModal';
|
|
| 23 |
import SuggestionsModal from './components/SuggestionsModal';
|
| 24 |
import ApiKeyModal from './components/ApiKeyModal';
|
| 25 |
import FixerModal from './components/FixerModal';
|
|
|
|
| 26 |
import { INITIAL_NODES, INITIAL_EDGES, LAYER_DEFINITIONS, TEMPLATES } from './constants';
|
| 27 |
import { generateRefinedPrompt, validateArchitecture, getArchitectureSuggestions, getUserApiKey, implementArchitectureSuggestions } from './services/geminiService';
|
| 28 |
import { NodeData, LayerType, LogEntry } from './types';
|
|
@@ -30,7 +31,8 @@ import { NodeData, LayerType, LogEntry } from './types';
|
|
| 30 |
let id = 1000;
|
| 31 |
const getId = () => `${id++}`;
|
| 32 |
|
| 33 |
-
|
|
|
|
| 34 |
const reactFlowWrapper = useRef<HTMLDivElement>(null);
|
| 35 |
const [nodes, setNodes, onNodesChange] = useNodesState(INITIAL_NODES);
|
| 36 |
const [edges, setEdges, onEdgesChange] = useEdgesState(INITIAL_EDGES);
|
|
@@ -553,10 +555,18 @@ const AppContent = () => {
|
|
| 553 |
);
|
| 554 |
};
|
| 555 |
|
| 556 |
-
const
|
| 557 |
-
|
| 558 |
-
<AppContent />
|
| 559 |
-
</ReactFlowProvider>
|
| 560 |
-
);
|
| 561 |
|
| 562 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
import SuggestionsModal from './components/SuggestionsModal';
|
| 24 |
import ApiKeyModal from './components/ApiKeyModal';
|
| 25 |
import FixerModal from './components/FixerModal';
|
| 26 |
+
import LandingPage from './components/LandingPage';
|
| 27 |
import { INITIAL_NODES, INITIAL_EDGES, LAYER_DEFINITIONS, TEMPLATES } from './constants';
|
| 28 |
import { generateRefinedPrompt, validateArchitecture, getArchitectureSuggestions, getUserApiKey, implementArchitectureSuggestions } from './services/geminiService';
|
| 29 |
import { NodeData, LayerType, LogEntry } from './types';
|
|
|
|
| 31 |
let id = 1000;
|
| 32 |
const getId = () => `${id++}`;
|
| 33 |
|
| 34 |
+
// --- MAIN BUILDER CONTENT ---
|
| 35 |
+
const Builder = () => {
|
| 36 |
const reactFlowWrapper = useRef<HTMLDivElement>(null);
|
| 37 |
const [nodes, setNodes, onNodesChange] = useNodesState(INITIAL_NODES);
|
| 38 |
const [edges, setEdges, onEdgesChange] = useEdgesState(INITIAL_EDGES);
|
|
|
|
| 555 |
);
|
| 556 |
};
|
| 557 |
|
| 558 |
+
const Main = () => {
|
| 559 |
+
const [showLanding, setShowLanding] = useState(true);
|
|
|
|
|
|
|
|
|
|
| 560 |
|
| 561 |
+
if (showLanding) {
|
| 562 |
+
return <LandingPage onEnterApp={() => setShowLanding(false)} />;
|
| 563 |
+
}
|
| 564 |
+
|
| 565 |
+
return (
|
| 566 |
+
<ReactFlowProvider>
|
| 567 |
+
<Builder />
|
| 568 |
+
</ReactFlowProvider>
|
| 569 |
+
);
|
| 570 |
+
};
|
| 571 |
+
|
| 572 |
+
export default Main;
|