diff --git a/compass/app/auth/new_Password/page.tsx b/compass/app/auth/newPassword/page.tsx similarity index 91% rename from compass/app/auth/new_Password/page.tsx rename to compass/app/auth/newPassword/page.tsx index 0ccee79..a49f566 100644 --- a/compass/app/auth/new_Password/page.tsx +++ b/compass/app/auth/newPassword/page.tsx @@ -19,7 +19,10 @@ export default function Page() { useEffect(() => { - setIsButtonDisabled(newPassword === '' || confirmPassword === ''); + console.log('newPassword',newPassword) + console.log('confirmPassword',confirmPassword) + setIsButtonDisabled(newPassword === '' || confirmPassword === '' || newPassword !== confirmPassword); + console.log('newPasswordDisabledTest',isButtonDisabled) }, [newPassword, confirmPassword]); diff --git a/compass/components/Input.tsx b/compass/components/Input.tsx index 618295b..d5a4348 100644 --- a/compass/components/Input.tsx +++ b/compass/components/Input.tsx @@ -1,13 +1,14 @@ -import React, { FunctionComponent, InputHTMLAttributes, ReactNode } from 'react'; +import React, { FunctionComponent, InputHTMLAttributes, ReactNode, ChangeEvent } from 'react'; type InputProps = InputHTMLAttributes & { icon?: ReactNode; title?: ReactNode; type?:ReactNode; placeholder?:ReactNode + onChange: (event: ChangeEvent) => void; }; -const Input: FunctionComponent = ({ icon, type, title, placeholder, ...rest }) => { +const Input: FunctionComponent = ({ icon, type, title, placeholder, onChange, ...rest }) => { return (