@@ -27,10 +27,15 @@ const staggerContainer = {
2727 } ,
2828} ;
2929
30+ type TabType =
31+ | "overview"
32+ | "technical"
33+ | "behavioral"
34+ | "companies"
35+ | "practice" ;
36+
3037const InterviewPrepPage : React . FC = ( ) => {
31- const [ activeTab , setActiveTab ] = useState <
32- "overview" | "technical" | "behavioral" | "companies" | "practice"
33- > ( "overview" ) ;
38+ const [ activeTab , setActiveTab ] = useState < TabType > ( "overview" ) ;
3439 const [ expandedCategories , setExpandedCategories ] = useState < {
3540 [ key : string ] : boolean ;
3641 } > ( { } ) ;
@@ -1501,11 +1506,7 @@ function InterviewPrepContent({
15011506 mockInterviewQuestions,
15021507} : {
15031508 activeTab : string ;
1504- setActiveTab : React . Dispatch <
1505- React . SetStateAction <
1506- "overview" | "technical" | "behavioral" | "companies" | "practice"
1507- >
1508- > ;
1509+ setActiveTab : React . Dispatch < React . SetStateAction < TabType > > ;
15091510 expandedCategories : { [ key : string ] : boolean } ;
15101511 toggleCategory : ( categoryIndex : number ) => void ;
15111512 showTips : { [ key : number ] : boolean } ;
@@ -1654,7 +1655,10 @@ function InterviewPrepContent({
16541655
16551656 { /* Practice Tab */ }
16561657 { activeTab === "practice" && (
1657- < PracticeTab mockInterviewQuestions = { mockInterviewQuestions } />
1658+ < PracticeTab
1659+ mockInterviewQuestions = { mockInterviewQuestions }
1660+ onTabChange = { setActiveTab }
1661+ />
16581662 ) }
16591663 </ div >
16601664
@@ -1702,3 +1706,4 @@ function InterviewPrepContent({
17021706}
17031707
17041708export default InterviewPrepPage ;
1709+ export type { TabType } ;
0 commit comments