File tree 3 files changed +43
-5
lines changed
3 files changed +43
-5
lines changed Original file line number Diff line number Diff line change
1
+ "use client" ;
2
+
1
3
import { Metadata } from "next" ;
2
4
import Image from "next/image" ;
3
5
import Link from "next/link" ;
6
+ import { redirect , useSearchParams } from "next/navigation" ;
4
7
import { buttonVariants } from "@/components/ui/button" ;
5
8
import { SignUp } from "@/components/user-auth-form" ;
6
9
import { cn } from "@/lib/utils" ;
7
10
8
11
import { signup } from "./actions" ;
9
12
10
- export const metadata : Metadata = {
11
- title : "Authentication" ,
12
- description : "Authentication forms built using the components." ,
13
- } ;
13
+ // export const metadata: Metadata = {
14
+ // title: "Authentication",
15
+ // description: "Authentication forms built using the components.",
16
+ // };
14
17
15
18
export default function AuthenticationPage ( ) {
19
+ const searchParams = useSearchParams ( ) ;
20
+ const noredir = searchParams . get ( "noredir" ) ;
21
+ const code = searchParams . get ( "code" ) ;
22
+ if ( code ) {
23
+ redirect ( "/signin?signup=true&code=" + code ) ;
24
+ }
25
+ // if (!noredir) {
26
+ // redirect("/signin");
27
+ // }
16
28
return (
17
29
< >
18
30
< div className = "md:hidden" >
Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+
3
+ import { Alert , AlertDescription , AlertTitle } from "../../components/ui/alert" ;
4
+
5
+ const SuccessPage : React . FC = ( ) => {
6
+ return (
7
+ < div >
8
+ < Alert >
9
+ < AlertTitle > Success!</ AlertTitle >
10
+ < AlertDescription >
11
+ Your account on "scouting-app" has been created successfully.
12
+ </ AlertDescription >
13
+ </ Alert >
14
+ </ div >
15
+ ) ;
16
+ } ;
17
+
18
+ export default SuccessPage ;
Original file line number Diff line number Diff line change 3
3
import { Metadata } from "next" ;
4
4
import Image from "next/image" ;
5
5
import Link from "next/link" ;
6
+ import { redirect , useSearchParams } from "next/navigation" ;
6
7
import { buttonVariants } from "@/components/ui/button" ;
7
8
import { SignIn } from "@/components/user-auth-form" ;
8
9
import { cn } from "@/lib/utils" ;
9
10
10
11
import { signin } from "./actions" ;
11
12
12
13
export default function LoginPage ( ) {
14
+ const searchParams = useSearchParams ( ) ;
15
+ const noredir = searchParams . get ( "noredir" ) ;
16
+ const code = searchParams . get ( "code" ) ;
17
+ const isSignup = searchParams . get ( "signup" ) ;
18
+ if ( code && isSignup ) {
19
+ redirect ( "/registered?action=show_coming_soon&code=" + code ) ;
20
+ }
13
21
return (
14
22
< >
15
23
< div className = "md:hidden" >
@@ -30,7 +38,7 @@ export default function LoginPage() {
30
38
</ div >
31
39
< div className = "container relative hidden h-screen flex-col items-center justify-center md:grid lg:max-w-none lg:grid-cols-2 lg:px-0" >
32
40
< Link
33
- href = "/signup "
41
+ href = "/?noredir=true "
34
42
className = { cn (
35
43
buttonVariants ( { variant : "ghost" } ) ,
36
44
"absolute right-4 top-4 md:right-8 md:top-8" ,
You can’t perform that action at this time.
0 commit comments