Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Back to Top Implementation #147

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

Petsamuel
Copy link

issue #126

This pull request introduces a new BackToTop component and integrates it into multiple pages, along with some minor CSS adjustments.

New Feature: BackToTop Component

  • src/components/BackToTop.jsx: Added a new BackToTop component that displays a button to scroll back to the top when the user scrolls down. This component uses useEffect to add and clean up a scroll event listener and useState to manage the button's visibility.

Integration of BackToTop Component

CSS Adjustments

  • src/index.css: Added scroll-behavior: smooth; to the html element for smooth scrolling and made minor syntax corrections. [1] [2] [3] [4]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant