@@ -14,11 +14,11 @@ import {getRedirect} from "@/lib/gateway"
1414function SignInContent ( ) {
1515
1616 const client = useClient ( )
17- const [ username , setUsername ] = useState < string | number > ( )
18- const [ password , setPassword ] = useState < string | number > ( )
17+ const [ userName , setUserName ] = useState < string | undefined > ( )
18+ const [ password , setPassword ] = useState < string | undefined > ( )
1919
2020 const setUser = ( email : string ) => {
21- setUsername ( email )
21+ setUserName ( email )
2222 setPassword ( 'p@55wOrd' )
2323 }
2424 const router = useRouter ( )
@@ -36,8 +36,8 @@ function SignInContent() {
3636 const onSubmit = async ( e : SyntheticEvent < HTMLFormElement > ) => {
3737 e . preventDefault ( )
3838
39- const { userName, password, rememberMe } = serializeToObject ( e . currentTarget ) ;
40- const api = await client . api ( new Authenticate ( { provider : 'credentials' , userName, password, rememberMe } ) )
39+ const { userName, password} = serializeToObject ( e . currentTarget ) ;
40+ const api = await client . api ( new Authenticate ( { provider :'credentials' , userName, password } ) )
4141 if ( api . succeeded )
4242 await revalidate ( )
4343 }
@@ -48,11 +48,11 @@ function SignInContent() {
4848 < section className = "mt-4 max-w-xl sm:shadow overflow-hidden sm:rounded-md" >
4949 < form onSubmit = { onSubmit } >
5050 < div className = "shadow overflow-hidden sm:rounded-md" >
51- < ErrorSummary except = "userName,password,rememberMe " />
51+ < ErrorSummary except = "userName,password" />
5252 < div className = "px-4 py-5 bg-white dark:bg-black space-y-6 sm:p-6" >
5353 < div className = "flex flex-col gap-y-4" >
5454 < TextInput id = "userName" help = "Email you signed up with" autoComplete = "email"
55- value = { username } onChange = { setUsername } />
55+ value = { userName } onChange = { setUserName } />
5656 < TextInput id = "password" type = "password" help = "6 characters or more"
5757 autoComplete = "current-password"
5858 value = { password } onChange = { setPassword } />
0 commit comments