@@ -11,7 +11,7 @@ import { ProjectCard } from '../../Projects/project-card'
1111import { mockApps , mockRecentFiles , mockTutorials } from '../../dc-temp/mock-data'
1212import { mockSidebarItems , mockNotifications } from '../test-data'
1313import { mockProjectSummary } from '../test-data'
14- import type { App , ProjectSummary , FileType , BusinessUnit } from '../types'
14+ import type { App , ProjectSummary , FileType , BusinessUnit , Project } from '../types'
1515// import { ColleaguesManagement } from "../colleagues-management"
1616import ColleaguesView from './../Views/ColleaguesView'
1717import KnowledgeView from '../Views/KnowledgeView'
@@ -32,9 +32,22 @@ const AnimatedCircles = () => (
3232interface HomeProps {
3333 title ?: string
3434 businessUnits : BusinessUnit [ ]
35+ projects : ProjectSummary [ ]
36+ fileCount : number
37+ teamMemberCount : number
38+ onCreateProject : ( ) => void
39+ onOpenProject : ( project : ProjectSummary ) => void
3540}
3641
37- export default function Home ( { title = 'Digital Colleagues' , businessUnits } : HomeProps ) {
42+ export default function Home ( {
43+ title = 'Digital Colleagues' ,
44+ businessUnits,
45+ projects,
46+ fileCount,
47+ teamMemberCount,
48+ onCreateProject,
49+ onOpenProject,
50+ } : HomeProps ) {
3851 const [ activeTab , setActiveTab ] = useState ( 'home' )
3952 const [ currentBusinessUnit , setCurrentBusinessUnit ] = useState < BusinessUnit > ( businessUnits [ 0 ] ) // Default to Design
4053
@@ -57,6 +70,7 @@ export default function Home({ title = 'Digital Colleagues', businessUnits }: Ho
5770
5871 const handleProjectOpen = ( project : ProjectSummary ) => {
5972 console . log ( 'Opening project:' , project . name )
73+ onOpenProject ( project )
6074 }
6175
6276 const handleProjectShare = ( project : ProjectSummary ) => {
@@ -100,17 +114,17 @@ export default function Home({ title = 'Digital Colleagues', businessUnits }: Ho
100114 < section className = "grid grid-cols-1 md:grid-cols-3 gap-6" >
101115 < div className = "bg-card p-6 rounded-lg border" >
102116 < h3 className = "text-lg font-semibold mb-2" > Projects</ h3 >
103- < p className = "text-3xl font-bold text-primary" > 12 </ p >
117+ < p className = "text-3xl font-bold text-primary" > { projects . length } </ p >
104118 < p className = "text-sm text-muted-foreground" > Active projects</ p >
105119 </ div >
106120 < div className = "bg-card p-6 rounded-lg border" >
107121 < h3 className = "text-lg font-semibold mb-2" > Team Members</ h3 >
108- < p className = "text-3xl font-bold text-primary" > 8 </ p >
122+ < p className = "text-3xl font-bold text-primary" > { teamMemberCount } </ p >
109123 < p className = "text-sm text-muted-foreground" > Collaborators</ p >
110124 </ div >
111125 < div className = "bg-card p-6 rounded-lg border" >
112126 < h3 className = "text-lg font-semibold mb-2" > Files</ h3 >
113- < p className = "text-3xl font-bold text-primary" > 156 </ p >
127+ < p className = "text-3xl font-bold text-primary" > { fileCount } </ p >
114128 < p className = "text-sm text-muted-foreground" > Project files</ p >
115129 </ div >
116130 </ section >
@@ -226,14 +240,14 @@ export default function Home({ title = 'Digital Colleagues', businessUnits }: Ho
226240 gradient = "bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600"
227241 primaryAction = { {
228242 label : 'New Project' ,
229- onClick : ( ) => console . log ( 'New project clicked' ) ,
243+ onClick : onCreateProject ,
230244 } }
231245 />
232246
233247 < section className = "space-y-4" >
234248 < h2 className = "text-2xl font-semibold" > Active Projects</ h2 >
235249 < div className = "grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3" >
236- { mockProjectSummary . map ( ( project ) => (
250+ { projects . map ( ( project ) => (
237251 < ProjectCard
238252 key = { project . name }
239253 project = { project }
0 commit comments