1-
2- import React from 'react' ;
3- import { SidebarPresenter } from "../presenters/SidebarPresenter.jsx"
4- import { SearchbarPresenter } from "../presenters/SearchbarPresenter.jsx"
1+ import React , { useState } from 'react' ;
2+ import { SidebarPresenter } from "../presenters/SidebarPresenter.jsx" ;
3+ import { SearchbarPresenter } from "../presenters/SearchbarPresenter.jsx" ;
54import { ListViewPresenter } from '../presenters/ListViewPresenter.jsx' ;
5+ import CourseView from '../views/CourseView.jsx' ;
6+ import { model } from '/src/model.js' ;
7+
8+ function App ( ) {
9+ const [ isPopupOpen , setIsPopupOpen ] = useState ( false ) ;
610
7- function App ( props ) {
811 return (
912 < div className = "flex h-screen w-screen" >
10-
11- < div className = "flex-auto w-40% h-full bg-gradient-to-t from-[#4f3646] to-[#6747c0]" >
12- < SidebarPresenter model = { props . model } />
13+ < div className = "flex-auto w-40% h-full bg-gradient-to-t from-[#4f3646] to-[#6747c0]" >
14+ < SidebarPresenter model = { model } />
1315 </ div >
14-
1516 < div className = "w-3/4 h-full flex flex-col" >
1617 < div className = "bg-blue-400 text-white" >
17- < SearchbarPresenter model = { props . model } />
18+ < SearchbarPresenter model = { model } />
1819 </ div >
19-
2020 < div className = "flex-auto border overflow-auto bg-[#121212]" >
21- < ListViewPresenter model = { props . model } />
21+ < ListViewPresenter model = { model } />
2222 </ div >
23-
2423 < button
2524 onClick = { ( ) => setIsPopupOpen ( true ) }
2625 className = "px-4 py-2 bg-blue-500 text-white"
2726 >
2827 open
2928 </ button >
30-
31- { /* Popup only overlays the black container */ }
3229 { isPopupOpen && (
3330 < div
3431 className = "fixed inset-0 bg-transparent flex justify-end"
3532 onClick = { ( ) => setIsPopupOpen ( false ) }
3633 >
37- { /* Wider modal container */ }
3834 < div
3935 className = "bg-indigo-400/70 backdrop-blur-sm h-full w-3/4 flex flex-col overflow-auto"
4036 onClick = { ( e ) => e . stopPropagation ( ) }
4137 >
42- { /* Container for CourseView which fills available space */ }
4338 < div className = "flex-1" >
4439 < CourseView />
4540 </ div >
@@ -57,4 +52,4 @@ function App(props) {
5752 ) ;
5853}
5954
60- export default App ;
55+ export default App ;
0 commit comments