File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1313
1414  <!-- Sign in prompt (hidden initially) --> 
1515  < button  id ="signin-btn "
16+           data-path ="{{ path }} "
1617          class ="hidden group btn-primary-outline-anchor w-52 h-[40px] sm:h-[30px] flex items-center justify-center space-x-2 "> 
1718    < div  class ="svg-icon size-3 icon-user-plus group-hover:bg-white transition-colors "> </ div > 
1819    < span > Attend event</ span > 
175176  const  signinBtn  =  document . getElementById ( "signin-btn" ) ; 
176177  if  ( signinBtn )  { 
177178    signinBtn . addEventListener ( "click" ,  ( )  =>  { 
179+       const  path  =  signinBtn . dataset . path  ||  window . location . pathname ; 
178180      showInfoAlert ( 
179-         " You need to be <a href='/log-in' class='underline font-medium' hx-boost='true'>logged in</a> to attend this event." , 
181+         ` You need to be <a href='/log-in?next_url= ${ path }  ' class='underline font-medium' hx-boost='true'>logged in</a> to attend this event.` , 
180182        true , 
181183      ) ; 
182184    } ) ; 
Original file line number Diff line number Diff line change 1212
1313  <!-- Sign in prompt (hidden initially) --> 
1414  < button  id ="signin-btn "
15+           data-path ="{{ path }} "
1516          class ="hidden group btn-primary-outline-anchor w-40 h-[40px] md:h-[30px] flex items-center justify-center space-x-2 "> 
1617    < div  class ="svg-icon size-3 icon-user-plus group-hover:bg-white transition-colors "> </ div > 
1718    < span > Join group</ span > 
135136  const  signinBtn  =  document . getElementById ( "signin-btn" ) ; 
136137  if  ( signinBtn )  { 
137138    signinBtn . addEventListener ( "click" ,  ( )  =>  { 
139+       const  path  =  signinBtn . dataset . path  ||  window . location . pathname ; 
138140      showInfoAlert ( 
139-         " You need to be <a href='/log-in' class='underline font-medium' hx-boost='true'>logged in</a> to join this group." , 
141+         ` You need to be <a href='/log-in?next_url= ${ path }  ' class='underline font-medium' hx-boost='true'>logged in</a> to join this group.` , 
140142        true , 
141143      ) ; 
142144    } ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments