@@ -100,43 +100,43 @@ const FloatingNavbar = forwardRef<NavbarRef, FloatingNavbarProps>(
100
100
return index >= 0 ? index : 0 ; // Default to first tab if path not found
101
101
} ;
102
102
103
- const [ activeTab , setActiveTab ] = useState ( findActiveTabIndex ( ) ) ;
104
- const [ isVisible , setIsVisible ] = useState ( true ) ;
103
+ // const [activeTab, setActiveTab] = useState(findActiveTabIndex());
104
+ // const [isVisible, setIsVisible] = useState(true);
105
105
106
106
// Update active tab when pathname changes
107
- useEffect ( ( ) => {
108
- const newActiveTab = findActiveTabIndex ( ) ;
109
- if ( newActiveTab !== activeTab ) {
110
- setActiveTab ( newActiveTab ) ;
111
- }
112
- } , [ pathname ] ) ;
107
+ // useEffect(() => {
108
+ // const newActiveTab = findActiveTabIndex();
109
+ // if (newActiveTab !== activeTab) {
110
+ // setActiveTab(newActiveTab);
111
+ // }
112
+ // }, [pathname]);
113
113
114
114
// Expose the activeTab value to parent components through the ref
115
- useImperativeHandle ( ref , ( ) => ( {
116
- activeTab,
117
- setActiveTab : ( index ) => handleTabChange ( index ) ,
118
- } ) ) ;
115
+ // useImperativeHandle(ref, () => ({
116
+ // activeTab,
117
+ // setActiveTab: (index) => handleTabChange(index),
118
+ // }));
119
119
120
- // Handle tab change locally (for animation purposes)
121
- const handleTabChange = ( index : number ) => {
122
- if ( index !== activeTab ) {
123
- setIsVisible ( false ) ;
124
- setTimeout ( ( ) => {
125
- setActiveTab ( index ) ;
126
- setIsVisible ( true ) ;
127
- } , animationDuration ) ;
128
- }
129
- } ;
120
+ // // Handle tab change locally (for animation purposes)
121
+ // const handleTabChange = (index: number) => {
122
+ // if (index !== activeTab) {
123
+ // setIsVisible(false);
124
+ // setTimeout(() => {
125
+ // setActiveTab(index);
126
+ // setIsVisible(true);
127
+ // }, animationDuration);
128
+ // }
129
+ // };
130
130
131
131
// Toggle theme function
132
132
const toggleTheme = ( ) => {
133
133
setTheme ( theme === 'dark' ? 'light' : 'dark' ) ;
134
134
} ;
135
135
136
136
// Ensure content is visible on initial render
137
- useEffect ( ( ) => {
138
- setIsVisible ( true ) ;
139
- } , [ ] ) ;
137
+ // useEffect(() => {
138
+ // setIsVisible(true);
139
+ // }, []);
140
140
141
141
// Using the same animation variants as in page.tsx
142
142
const containerVariants = {
@@ -163,22 +163,22 @@ const FloatingNavbar = forwardRef<NavbarRef, FloatingNavbarProps>(
163
163
} ,
164
164
} ;
165
165
166
- const handleTabClick = (
167
- e : React . MouseEvent ,
168
- index : number ,
169
- label : string ,
170
- path : string
171
- ) => {
172
- if ( label === 'Pricing' ) {
173
- e . preventDefault ( ) ;
174
- alert ( 'Coming Soon' ) ;
175
- } else if ( label === 'Codefox Journey' ) {
176
- e . preventDefault ( ) ;
177
- alert ( 'Coming Soon' ) ;
178
- } else {
179
- handleTabChange ( index ) ;
180
- }
181
- } ;
166
+ // const handleTabClick = (
167
+ // e: React.MouseEvent,
168
+ // index: number,
169
+ // label: string,
170
+ // path: string
171
+ // ) => {
172
+ // if (label === 'Pricing') {
173
+ // e.preventDefault();
174
+ // alert('Coming Soon');
175
+ // } else if (label === 'Codefox Journey') {
176
+ // e.preventDefault();
177
+ // alert('Coming Soon');
178
+ // } else {
179
+ // handleTabChange(index);
180
+ // }
181
+ // };
182
182
183
183
return (
184
184
< >
@@ -241,61 +241,20 @@ const FloatingNavbar = forwardRef<NavbarRef, FloatingNavbarProps>(
241
241
< SunMoon size = { 20 } />
242
242
</ button >
243
243
244
- < div
245
- className = { `bg-gray-100 dark:bg-gray-800 rounded-full px-2 py-1 shadow-md ${ tabsContainerClassName } ` }
246
- >
247
- < div className = "flex relative z-10" >
248
- { tabs . map ( ( tab , index ) => (
249
- < Link
250
- href = { tab . path }
251
- key = { index }
252
- onClick = { ( e ) =>
253
- handleTabClick ( e , index , tab . label , tab . path )
254
- }
255
- className = "focus:outline-none"
256
- >
257
- < div
258
- className = { `relative px-4 py-2 font-medium text-sm rounded-full transition-all duration-300 ${
259
- activeTab === index
260
- ? `text-white ${ activeTabClassName } `
261
- : `text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-white ${ inactiveTabClassName } `
262
- } `}
263
- >
264
- { /* Animated background for active tab */ }
265
- < AnimatePresence >
266
- { activeTab === index && (
267
- < motion . span
268
- className = "absolute inset-0 bg-primary-500 dark:bg-primary-600 rounded-full -z-10"
269
- layoutId = "activeTabBackground"
270
- initial = { { opacity : 0 } }
271
- animate = { { opacity : 1 } }
272
- exit = { { opacity : 0 } }
273
- transition = { {
274
- duration : animationDuration / 1000 ,
275
- } }
276
- />
277
- ) }
278
- </ AnimatePresence >
279
- { tab . label }
280
- </ div >
281
- </ Link >
282
- ) ) }
283
- </ div >
284
- </ div >
285
-
286
244
{ /* Authentication Buttons */ }
287
245
{ ! isAuthorized && (
288
246
< div className = "flex items-center space-x-4 transition-transform duration-300" >
289
247
< button
290
248
onClick = { ( ) => setShowSignIn ( true ) }
291
- className = "px-4 py-2 rounded-md border border-primary-500 text-primary-500 dark:text-primary-400
249
+ className = "px-4 py-1 rounded-sm border border-primary-500 text-primary-500 dark:text-primary-400
292
250
hover:bg-primary-500 hover:text-white transition-colors"
293
251
>
294
252
Sign In
295
253
</ button >
254
+
296
255
< button
297
256
onClick = { ( ) => setShowSignUp ( true ) }
298
- className = "px-4 py-2 rounded-md bg-primary-500 text-white hover:bg-primary-600 transition-colors"
257
+ className = "px-4 py-1 rounded-sm bg-primary-500 text-white hover:bg-primary-600 transition-colors"
299
258
>
300
259
Sign Up
301
260
</ button >
0 commit comments