Material UI : provides a vast library of pre-designed and customizable components.
React-router-dom: is a popular library for handling routing in React applications.
axios: popular JavaScript library used for making HTTP requests from browsers or Node.js environments.
react-hook-form: library for managing form state and validation in React applications using Hooks.
Components:
Added a folder named componentsto src.
Created two components:
Login: Contains the logic for login.
NavBar: Contains only a text.
Form elements
Inside the components folder, created a folder named FormElements to store all the fields used in forms.
Added three field:
MyTextField
MyPasswordField
MyButton
CSS
Modified index.css and App.css to add styles to the elements used in our codebase.
SmmApi
Created a utility class named SmmApi to encapsulate Axios requests to the backend API.
Implemented a login method to handle user authentication by sending a POST request to the login endpoint.
Added a interceptor to refresh token when access is expired
This PR addresses issue #78
Implementation
components
tosrc
.Created two components:
Login
: Contains the logic for login.NavBar
: Contains only a text.components
folder, created a folder namedFormElements
to store all the fields used in forms.Added three field:
MyTextField
MyPasswordField
MyButton
Modified
index.css
andApp.css
to add styles to the elements used in our codebase.Created a utility class named SmmApi to encapsulate Axios requests to the backend API. Implemented a login method to handle user authentication by sending a POST request to the login endpoint. Added a interceptor to refresh token when access is expired