@@ -30,17 +30,14 @@ interface CompanyDashboardStats {
3030 totalHackathons : number
3131 totalRegistrations : number
3232 totalViews : number
33- totalClicks : number
3433 pendingApprovals : number
3534 eventMetrics : {
3635 views : number
3736 registrations : number
38- clicks : number
3937 }
4038 hackathonMetrics : {
4139 views : number
4240 registrations : number
43- clicks : number
4441 }
4542 recentChange ?: {
4643 events : number
@@ -189,49 +186,35 @@ export function CompanyDashboard({ company }: CompanyDashboardProps) {
189186 const totalRegistrations = eventRegistrations + hackathonRegistrations
190187 /* eslint-enable @typescript-eslint/no-explicit-any */
191188
192- // Calculate actual views and clicks from events and hackathons
189+ // Calculate actual views from events and hackathons
193190 /* eslint-disable @typescript-eslint/no-explicit-any */
194191 const eventViews = eventsData . events ?. reduce (
195192 ( sum : number , e : any ) => sum + ( e . views || 0 ) ,
196193 0
197194 ) || 0
198195
199- const eventClicks = eventsData . events ?. reduce (
200- ( sum : number , e : any ) => sum + ( e . clicks || 0 ) ,
201- 0
202- ) || 0
203-
204196 const hackathonViews = hackathonsData . hackathons ?. reduce (
205197 ( sum : number , h : any ) => sum + ( h . views || 0 ) ,
206198 0
207199 ) || 0
208-
209- const hackathonClicks = hackathonsData . hackathons ?. reduce (
210- ( sum : number , h : any ) => sum + ( h . clicks || 0 ) ,
211- 0
212- ) || 0
213200 /* eslint-enable @typescript-eslint/no-explicit-any */
214201
215- // Use actual views and clicks from events/hackathons tables, not analytics
202+ // Use actual views from events/hackathons tables, not analytics
216203 const totalViews = eventViews + hackathonViews
217- const totalClicks = eventClicks + hackathonClicks
218204
219205 setStats ( {
220206 totalEvents : approvedEvents . length ,
221207 totalHackathons : approvedHackathons . length ,
222208 totalRegistrations : totalRegistrations ,
223209 totalViews : totalViews ,
224- totalClicks : totalClicks ,
225210 pendingApprovals : pendingEvents . length ,
226211 eventMetrics : {
227212 views : eventViews ,
228213 registrations : eventRegistrations ,
229- clicks : eventClicks ,
230214 } ,
231215 hackathonMetrics : {
232216 views : hackathonViews ,
233217 registrations : hackathonRegistrations ,
234- clicks : hackathonClicks ,
235218 } ,
236219 recentChange : {
237220 events : 0 , // Could calculate from analytics
@@ -442,15 +425,6 @@ export function CompanyDashboard({ company }: CompanyDashboardProps) {
442425 { stats . eventMetrics . registrations . toLocaleString ( ) }
443426 </ span >
444427 </ div >
445- < div className = "flex items-center justify-between" >
446- < div className = "flex items-center gap-2" >
447- < Activity className = "h-4 w-4 text-purple-400" />
448- < span className = "text-sm text-zinc-300" > Clicks</ span >
449- </ div >
450- < span className = "text-lg font-semibold text-white" >
451- { stats . eventMetrics . clicks . toLocaleString ( ) }
452- </ span >
453- </ div >
454428 { stats . eventMetrics . views > 0 && (
455429 < div className = "pt-2 border-t border-purple-700/30" >
456430 < div className = "flex items-center justify-between text-xs" >
@@ -494,15 +468,6 @@ export function CompanyDashboard({ company }: CompanyDashboardProps) {
494468 { stats . hackathonMetrics . registrations . toLocaleString ( ) }
495469 </ span >
496470 </ div >
497- < div className = "flex items-center justify-between" >
498- < div className = "flex items-center gap-2" >
499- < Activity className = "h-4 w-4 text-orange-400" />
500- < span className = "text-sm text-zinc-300" > Clicks</ span >
501- </ div >
502- < span className = "text-lg font-semibold text-white" >
503- { stats . hackathonMetrics . clicks . toLocaleString ( ) }
504- </ span >
505- </ div >
506471 { stats . hackathonMetrics . views > 0 && (
507472 < div className = "pt-2 border-t border-orange-700/30" >
508473 < div className = "flex items-center justify-between text-xs" >
0 commit comments