File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import { signIn } from "next-auth/react" ;
44import { useState } from "react" ;
55import Link from "next/link" ;
6- import { useRouter } from "next/navigation" ;
76import { useLocale } from "@/components/LocaleProvider" ;
87
98export default function SignupPage ( ) {
10- const router = useRouter ( ) ;
119 const { t } = useLocale ( ) ;
1210 const [ email , setEmail ] = useState ( "" ) ;
1311 const [ name , setName ] = useState ( "" ) ;
@@ -36,8 +34,7 @@ export default function SignupPage() {
3634 setError ( res . error ) ;
3735 }
3836 } else if ( res ?. ok ) {
39- router . push ( "/dashboard" ) ;
40- router . refresh ( ) ;
37+ window . location . href = "/dashboard" ;
4138 }
4239 } catch {
4340 setError ( t ( "login.genericError" ) ) ;
Original file line number Diff line number Diff line change 33import { signIn } from "next-auth/react" ;
44import { useState } from "react" ;
55import Link from "next/link" ;
6- import { useRouter } from "next/navigation" ;
76import { useLocale } from "@/components/LocaleProvider" ;
87
98export default function LoginPage ( ) {
10- const router = useRouter ( ) ;
119 const { t } = useLocale ( ) ;
1210 const [ email , setEmail ] = useState ( "" ) ;
1311 const [ loading , setLoading ] = useState ( false ) ;
@@ -34,8 +32,7 @@ export default function LoginPage() {
3432 setError ( res . error ) ;
3533 }
3634 } else if ( res ?. ok ) {
37- router . push ( "/dashboard" ) ;
38- router . refresh ( ) ;
35+ window . location . href = "/dashboard" ;
3936 }
4037 } catch {
4138 setError ( t ( "login.genericError" ) ) ;
You can’t perform that action at this time.
0 commit comments