This pull request introduces a number of changes primarily focused on restructuring the login functionality and updating some UI elements. The most significant changes include the creation of a new LoginForm component, renaming and refactoring the login-register.tsx file to login.tsx, and updating some text and styling in the header.tsx file.
New Component Creation:
src/components/forms/login-form.tsx: A new LoginForm component was created. This component uses the react-hook-form library to handle form state and submission. It includes fields for email and password, with validation rules, and makes a POST request to an API endpoint upon form submission.
File Renaming and Refactoring:
src/pages/login-register.tsx to src/pages/login.tsx: The file was renamed, and the component was refactored from LoginRegister to Login. The import of React was added, and the RegisterForm import was replaced with LoginForm. The PageProps type was changed from NextPage & to interface, and the useEffect dependencies were updated. The SEO title and breadcrumb were updated to reflect the new page purpose, and the RegisterForm was replaced with the new LoginForm. [1][2][3][4]
UI Updates:
src/layouts/headers/header.tsx: The text "Our 10th Birthday is in" was changed to "Our 10th Anniversary is in", and additional styling was added to the text.
src/pages/profile.tsx: The redirect path in the useEffect hook was updated from "/login-register" to "/profile".
This pull request introduces a number of changes primarily focused on restructuring the login functionality and updating some UI elements. The most significant changes include the creation of a new
LoginForm
component, renaming and refactoring thelogin-register.tsx
file tologin.tsx
, and updating some text and styling in theheader.tsx
file.New Component Creation:
src/components/forms/login-form.tsx
: A newLoginForm
component was created. This component uses thereact-hook-form
library to handle form state and submission. It includes fields for email and password, with validation rules, and makes a POST request to an API endpoint upon form submission.File Renaming and Refactoring:
src/pages/login-register.tsx
tosrc/pages/login.tsx
: The file was renamed, and the component was refactored fromLoginRegister
toLogin
. The import ofReact
was added, and theRegisterForm
import was replaced withLoginForm
. ThePageProps
type was changed fromNextPage &
tointerface
, and theuseEffect
dependencies were updated. The SEO title and breadcrumb were updated to reflect the new page purpose, and theRegisterForm
was replaced with the newLoginForm
. [1] [2] [3] [4]UI Updates:
src/layouts/headers/header.tsx
: The text "Our 10th Birthday is in" was changed to "Our 10th Anniversary is in", and additional styling was added to the text.src/pages/profile.tsx
: The redirect path in theuseEffect
hook was updated from "/login-register" to "/profile".