File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ const ActionHandlerContent: React.FC = () => {
120120 } ) ;
121121
122122 React . useEffect ( ( ) => {
123- const modeParam = searchParams . get ( 'mode' ) as Action ;
123+ const modeParam = searchParams . getAll ( 'mode' ) [ 0 ] as Action ; // Always get the first mode param
124124 const codeParam = searchParams . get ( 'oobCode' ) ;
125125
126126 setMode ( modeParam ) ;
@@ -129,7 +129,7 @@ const ActionHandlerContent: React.FC = () => {
129129 if ( ! auth || ! modeParam || ! codeParam ) {
130130 if ( ! auth ) setLoading ( false ) ;
131131 if ( ! modeParam || ! codeParam ) {
132- setError ( "Invalid action link. Please try again ." ) ;
132+ setError ( "This link is invalid, expired, or has already been used . Please log in or request a new verification email ." ) ;
133133 setLoading ( false ) ;
134134 }
135135 return ;
@@ -200,7 +200,11 @@ const ActionHandlerContent: React.FC = () => {
200200 < XCircle className = "h-12 w-12 text-destructive mx-auto mb-4" />
201201 < h2 className = "text-2xl font-bold mb-2" > Action Failed</ h2 >
202202 < p className = "text-muted-foreground mb-6" > { error } </ p >
203- < Button onClick = { ( ) => router . push ( '/' ) } > Go to Homepage</ Button >
203+ < div className = "flex flex-col gap-2 items-center" >
204+ < Button onClick = { ( ) => router . push ( '/' ) } variant = "secondary" > Go to Homepage</ Button >
205+ < Button onClick = { ( ) => router . push ( '/?action=login' ) } variant = "default" > Go to Login</ Button >
206+ < Button onClick = { ( ) => setShowResendForm ( true ) } variant = "outline" > Resend Verification Email</ Button >
207+ </ div >
204208 </ div >
205209 ) ;
206210 }
You can’t perform that action at this time.
0 commit comments