TeamShiksha / logoexecutive

Logo Executive is your partner in logo exploration. Our platform boasts a collection of APIs designed to simplify the process of obtaining company logos.
https://logoexecutive.vercel.app/
24 stars 20 forks source link

Fix: Navigation links scroll to top on click #339

Closed Asin-Junior-Honore closed 3 months ago

Asin-Junior-Honore commented 3 months ago

Summary

Fixes issue #338.

Description

Updated ScrollContext.js to include a scroll-to-top functionality when navigation links are clicked. This ensures that the user is brought to the top of the new page upon navigation.

How to Test the Changes

  1. Clone the repository and switch to the branch where this PR is made:

    git clone https://github.com/TeamShiksha/logoexecutive.git
    cd logoexecutive
    git checkout <branch-name>
  2. Navigate to the client directory and ensure Yarn is installed and dependencies are up to date:

    cd client
    yarn install
  3. Start the application:

    yarn start
  4. Navigate to any page with scrollable content.

  5. Click on any navigation link within the application.

  6. Verify that the page scrolls to the top upon navigation.

Context

The issue occurred when users navigated within the application; the page did not reset to the top, causing a poor user experience. This PR addresses this by implementing a scroll-to-top functionality in ScrollContext.js.

Checklist

Asin-Junior-Honore commented 3 months ago

Hey @aps08 , I have added a test file for the new ScrollContext. Kindly review at your earliest convenience.

aps08 commented 3 months ago

Pre-commit is fine. @anandbaraik @samyak269 review this.

anandbaraik commented 3 months ago

@aps08 looked at the PR, tested locally and navigation links scroll to top are working fine. Test for ScrollContext is passing. @Asin-Junior-Honore, I have added a comment, please take a look and change it. @samyak269 please review it and once it's fine we can merge. CC: @aps08

Asin-Junior-Honore commented 3 months ago

hey @anandbaraik thanks for the review, I would implement the requested changes as soon as possible thanks😊

Asin-Junior-Honore commented 3 months ago

hey @anandbaraik I have made the requested changes. kindly review, thanks😊

aps08 commented 3 months ago

@Asin-Junior-Honore Changes are deployed and working properly. And it is working fine. Thank you for your contribution.