-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
42 lines (37 loc) Β· 1.23 KB
/
App.tsx
File metadata and controls
42 lines (37 loc) Β· 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React, { useState } from 'react';
import { Navbar } from './components/Navbar';
import { Home } from './components/Home';
import { PrepFlow } from './components/PrepFlow';
import { PrepScript } from './components/PrepScript';
import { PrepEval } from './components/PrepEval';
import { LiveMode } from './components/LiveMode';
import { AppView } from './types';
function App() {
const [currentView, setCurrentView] = useState<AppView>('home');
const renderView = () => {
switch (currentView) {
case 'home':
return <Home onStart={setCurrentView} />;
case 'prep-flow':
return <PrepFlow />;
case 'prep-script':
return <PrepScript />;
case 'prep-eval':
return <PrepEval />;
case 'live':
return <LiveMode />;
default:
return <Home onStart={setCurrentView} />;
}
};
return (
<div className="min-h-screen bg-stone-50 font-sans text-stone-900 selection:bg-brand-green selection:text-white">
{/* Navbar is visible on all pages, though style might adapt slightly */}
<Navbar currentView={currentView} onChangeView={setCurrentView} />
<main className="pt-0">
{renderView()}
</main>
</div>
);
}
export default App;