Skip to content

Commit

Permalink
added scroll to top componient
Browse files Browse the repository at this point in the history
  • Loading branch information
okeino committed Oct 16, 2023
1 parent f10640f commit bd61a96
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/atoms/scrollToTop.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// scrollToTop.tsx
import { useEffect } from 'react';

const ScrollToTop: React.FC = () => {
useEffect(() => {
window.scrollTo(0, 0);
}, []);

return null;
};

export default ScrollToTop;

0 comments on commit bd61a96

Please sign in to comment.