File tree 1 file changed +2
-4
lines changed
frontend/app/(auth)/login 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import PageHeading from "@/app/components/ui/PageHeading";
7
7
import { useSupabase } from "@/app/supabase-provider" ;
8
8
import { useToast } from "@/lib/hooks/useToast" ;
9
9
import Link from "next/link" ;
10
- import { useRouter } from "next/navigation" ;
10
+ import { redirect } from "next/navigation" ;
11
11
import { useState } from "react" ;
12
12
import { GoogleLoginButton } from "./components/GoogleLogin" ;
13
13
import { MagicLinkLogin } from "./components/MagicLinkLogin" ;
@@ -20,8 +20,6 @@ export default function Login() {
20
20
21
21
const { publish } = useToast ( ) ;
22
22
23
- const router = useRouter ( ) ;
24
-
25
23
const handleLogin = async ( ) => {
26
24
setIsPending ( true ) ;
27
25
const { data, error } = await supabase . auth . signInWithPassword ( {
@@ -44,7 +42,7 @@ export default function Login() {
44
42
} ;
45
43
46
44
if ( session ?. user !== undefined ) {
47
- router . replace ( "/" ) ;
45
+ redirect ( "/" ) ;
48
46
}
49
47
50
48
return (
You can’t perform that action at this time.
0 commit comments