@@ -36,13 +36,16 @@ import {
3636 SheetTrigger ,
3737} from "@codevs/ui" ;
3838
39+ // Navigation items for top navbar and mobile drawer
3940const NAV_ITEMS = [
4041 { id : "1" , title : "Our Services" , path : "/services" } ,
4142 { id : "2" , title : "About Us" , path : "/#whychooseus" } ,
4243 { id : "3" , title : "Book a Call" , path : "/bookacall" } ,
43- { id : "4" , title : "Hire a CoDevs" , path : "/hire-a-codev" } ,
44+ { id : "4" , title : "Be a Codev" , path : "/codevs" } , // ✅ ADDED: New link after Book a Call
45+ { id : "5" , title : "Hire a CoDevs" , path : "/hire-a-codev" } ,
4446] as const ;
4547
48+ // Get menu items based on user application status
4649const getMenuItems = (
4750 status : string ,
4851 role_id : number ,
@@ -271,7 +274,7 @@ const Navigation = () => {
271274
272275 async function fetchUser ( ) {
273276 try {
274- // FIXED: Use getUser() instead of getSession()
277+ // Use getUser() for proper auth check
275278 const { data : { user } , error : authError } = await supabase . auth . getUser ( ) ;
276279
277280 if ( authError ) {
@@ -281,7 +284,6 @@ const Navigation = () => {
281284 }
282285
283286 if ( ! user ) {
284- // not logged in → silent
285287 setUserData ( null ) ;
286288 return ;
287289 }
@@ -314,8 +316,8 @@ const Navigation = () => {
314316 const handleLogout = async ( ) => {
315317 try {
316318 await signOut ( ) ;
317- setUserData ( null ) ; // Clear userData after logout
318- setOpenSheet ( false ) ; // Close the mobile drawer (if open)
319+ setUserData ( null ) ;
320+ setOpenSheet ( false ) ;
319321 } catch ( error ) {
320322 console . error ( "Failed to log out:" , error ) ;
321323 }
0 commit comments