1- " use client"
2-
3- import type React from " react"
4- import { useState , useEffect } from " react"
5- import { useIsMobile } from " @/app/hooks/use-mobile"
6-
7- import { Tabs , TabsContent } from " @/components/ui/tabs"
8- import { HelpCenterHeader } from " @/app/dashboard/components/help-center/help-center-header"
9- import { TabsNavigation } from " @/app/dashboard/components/help-center/tabs/tabs-navigation"
10- import { FAQSection } from " @/app/dashboard/components/help-center/tabs/faq-section"
11- import { GuidesSection } from " @/app/dashboard/components/help-center/tabs/guides-section"
12- import { TroubleshootingSection } from " @/app/dashboard/components/help-center/tabs/troubleshooting-section"
13- import { SupportSection } from " @/app/dashboard/components/help-center/tabs/support-section"
14- import { SearchDialog } from " @/app/dashboard/components/help-center/search-dialogue"
15- import { MobileNavigation } from " @/app/dashboard/components/help-center/mobile-navigation"
16- import { LoadingSpinner } from " @/app/dashboard/components/help-center/loading-spinner"
1+ ' use client' ;
2+
3+ import type React from ' react' ;
4+ import { useState , useEffect } from ' react' ;
5+ import { useIsMobile } from ' @/app/hooks/use-mobile' ;
6+
7+ import { Tabs , TabsContent } from ' @/components/ui/tabs' ;
8+ import { HelpCenterHeader } from ' @/app/dashboard/components/help-center/help-center-header' ;
9+ import { TabsNavigation } from ' @/app/dashboard/components/help-center/tabs/tabs-navigation' ;
10+ import { FAQSection } from ' @/app/dashboard/components/help-center/tabs/faq-section' ;
11+ import { GuidesSection } from ' @/app/dashboard/components/help-center/tabs/guides-section' ;
12+ import { TroubleshootingSection } from ' @/app/dashboard/components/help-center/tabs/troubleshooting-section' ;
13+ import { SupportSection } from ' @/app/dashboard/components/help-center/tabs/support-section' ;
14+ import { SearchDialog } from ' @/app/dashboard/components/help-center/search-dialogue' ;
15+ import { MobileNavigation } from ' @/app/dashboard/components/help-center/mobile-navigation' ;
16+ import { LoadingSpinner } from ' @/app/dashboard/components/help-center/loading-spinner' ;
1717
1818export default function HelpCenterPage ( ) {
19- const [ open , setOpen ] = useState ( false )
20- const [ activeTab , setActiveTab ] = useState ( " faqs" )
21- const [ isLoading , setIsLoading ] = useState ( true )
22- const isMobile = useIsMobile ( )
19+ const [ open , setOpen ] = useState ( false ) ;
20+ const [ activeTab , setActiveTab ] = useState ( ' faqs' ) ;
21+ const [ isLoading , setIsLoading ] = useState ( true ) ;
22+ const isMobile = useIsMobile ( ) ;
2323
2424 // Simulate loading state
2525 useEffect ( ( ) => {
2626 const timer = setTimeout ( ( ) => {
27- setIsLoading ( false )
28- } , 800 )
29- return ( ) => clearTimeout ( timer )
30- } , [ ] )
27+ setIsLoading ( false ) ;
28+ } , 800 ) ;
29+ return ( ) => clearTimeout ( timer ) ;
30+ } , [ ] ) ;
3131
3232 // Mock function to track article views
3333 const trackArticleView = ( articleId : string ) => {
34- console . log ( `Article viewed: ${ articleId } ` )
34+ console . log ( `Article viewed: ${ articleId } ` ) ;
3535 // In a real implementation, this would send analytics data
36- }
36+ } ;
3737
3838 // Toggle command dialog
3939 const toggleSearch = ( ) => {
40- setOpen ( ! open )
41- }
40+ setOpen ( ! open ) ;
41+ } ;
4242
4343 // Handle search keyboard shortcut
4444 const handleKeyDown = ( e : React . KeyboardEvent ) => {
45- if ( e . key === "k" && ( e . metaKey || e . ctrlKey ) ) {
46- e . preventDefault ( )
47- toggleSearch ( )
45+ if ( e . key === 'k' && ( e . metaKey || e . ctrlKey ) ) {
46+ e . preventDefault ( ) ;
47+ toggleSearch ( ) ;
4848 }
49- }
49+ } ;
5050
5151 return (
5252 < div
@@ -55,9 +55,6 @@ export default function HelpCenterPage() {
5555 onKeyDown = { handleKeyDown }
5656 >
5757 < div className = "container mx-auto px-2 md:px-4 max-w-7xl" >
58- < div className = "absolute top-0 right-0 w-32 md:w-64 h-32 md:h-64 bg-blue-800 rounded-full opacity-5 -mr-16 md:-mr-32 -mt-16 md:-mt-32" > </ div >
59- < div className = "absolute bottom-0 left-0 w-48 md:w-96 h-48 md:h-96 bg-blue-700 rounded-full opacity-5 -ml-24 md:-ml-48 -mb-24 md:-mb-48" > </ div >
60-
6158 { /* Header with search */ }
6259 < HelpCenterHeader toggleSearch = { toggleSearch } />
6360
@@ -68,35 +65,65 @@ export default function HelpCenterPage() {
6865 ) : (
6966 < >
7067 { /* Tabs */ }
71- < Tabs defaultValue = "faqs" className = "w-full" onValueChange = { setActiveTab } value = { activeTab } >
72- < TabsNavigation activeTab = { activeTab } onTabChange = { setActiveTab } />
68+ < Tabs
69+ defaultValue = "faqs"
70+ className = "w-full"
71+ onValueChange = { setActiveTab }
72+ value = { activeTab }
73+ >
74+ < TabsNavigation
75+ activeTab = { activeTab }
76+ onTabChange = { setActiveTab }
77+ />
7378
7479 { /* Tab Contents */ }
75- < TabsContent value = "faqs" className = "space-y-0 md:space-y-0 animate-in fade-in-50 duration-300" >
80+ < TabsContent
81+ value = "faqs"
82+ className = "space-y-0 md:space-y-0 animate-in fade-in-50 duration-300"
83+ >
7684 < FAQSection trackArticleView = { trackArticleView } />
7785 </ TabsContent >
7886
79- < TabsContent value = "guides" className = "space-y-0 animate-in fade-in-50 duration-300" >
87+ < TabsContent
88+ value = "guides"
89+ className = "space-y-0 animate-in fade-in-50 duration-300"
90+ >
8091 < GuidesSection trackArticleView = { trackArticleView } />
8192 </ TabsContent >
8293
83- < TabsContent value = "troubleshooting" className = "space-y-0 animate-in fade-in-50 duration-300" >
94+ < TabsContent
95+ value = "troubleshooting"
96+ className = "space-y-0 animate-in fade-in-50 duration-300"
97+ >
8498 < TroubleshootingSection trackArticleView = { trackArticleView } />
8599 </ TabsContent >
86100
87- < TabsContent value = "support" className = "space-y-0 animate-in fade-in-50 duration-300" >
101+ < TabsContent
102+ value = "support"
103+ className = "space-y-0 animate-in fade-in-50 duration-300"
104+ >
88105 < SupportSection />
89106 </ TabsContent >
90107 </ Tabs >
91108
92109 { /* Mobile Bottom Navigation */ }
93- { isMobile && < MobileNavigation activeTab = { activeTab } onTabChange = { setActiveTab } /> }
110+ { isMobile && (
111+ < MobileNavigation
112+ activeTab = { activeTab }
113+ onTabChange = { setActiveTab }
114+ />
115+ ) }
94116 </ >
95117 ) }
96118
97119 { /* Search Dialog */ }
98- < SearchDialog open = { open } setOpen = { setOpen } setActiveTab = { setActiveTab } trackArticleView = { trackArticleView } />
120+ < SearchDialog
121+ open = { open }
122+ setOpen = { setOpen }
123+ setActiveTab = { setActiveTab }
124+ trackArticleView = { trackArticleView }
125+ />
99126 </ div >
100127 </ div >
101- )
128+ ) ;
102129}
0 commit comments