Trisha-tech / OnlineBookSales

This project named Online Book Sales - Backend deals with developing an e-commerce website for Online Book Sale. It provides the user with a catalog of different books available for purchase in the store. In order to facilitate online purchase, a shopping cart is provided to the user.
https://book4u-j5au.onrender.com/
MIT License
139 stars 242 forks source link

improve UI of NavBar and correct the file structure add the context #142

Closed ASHISH-JHA94 closed 6 months ago

ASHISH-JHA94 commented 6 months ago

Description

Authentication Context Enhancement: Modified the AuthContext to use useEffect for maintaining the user's login state across page refreshes by checking the token from localStorage.

Logout Functionality: Implemented a standard approach to logging out the user, ensuring the token is properly removed from localStorage and the user state is updated.

Conditional Rendering in Navbar: Added conditional rendering in the Navbar to show different options based on whether the user is logged in or not. This includes a Profile component that appears when the user is logged in.

Responsive Design: Ensured that the Navbar properly adjusts for mobile and desktop views, including showing login/logout options appropriately in both modes.

update the file structure and remove redundancy.

Added home page ui and things can be improved

created one ToastContext

fixing the bad routing implementation

Fixes: #(issue no.)

fixes: #134

Checklist:

ATTACH SCREEN-SHOTS / DEPLOYMENT LINK

https://github.com/Trisha-tech/OnlineBookSales/assets/136432304/acb0e2d8-a663-4fbe-b1c2-7c6ca00f055e

github-actions[bot] commented 6 months ago

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

ASHISH-JHA94 commented 6 months ago

PLEASE CHECK EVERYTHING BEFORE MERGING ANY OTHER PULL REQUEST.