From ae04fe73ddef87c4dd0ac8d290e5ce771384373c Mon Sep 17 00:00:00 2001 From: paulkrishanu4 Date: Sat, 1 Jun 2024 12:20:12 +0530 Subject: [PATCH 1/5] fixed scroll to top on render of new page --- frontend/src/App.js | 9 ++++++++- frontend/src/ChatAssistant/ChatAssistant.css | 1 + frontend/src/ChatAssistant/ChatAssistant.jsx | 4 +++- frontend/src/Component/ScrollToTop.jsx | 14 ++++++++++++++ frontend/src/index.css | 2 +- frontend/src/index.js | 8 ++------ 6 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 frontend/src/Component/ScrollToTop.jsx diff --git a/frontend/src/App.js b/frontend/src/App.js index a850fece..89e98aff 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -13,13 +13,18 @@ import OpenSource from "./Component/OpenSource"; import Review from "./Component/Review"; import AOS from 'aos'; import 'aos/dist/aos.css'; - +import { BrowserRouter } from 'react-router-dom'; +import ScrollToTop from "./Component/ScrollToTop"; function App() { const [searchQuery, setSearchQuery] = useState(""); AOS.init(); return ( <> + + + + }> }> @@ -28,9 +33,11 @@ function App() { }> } /> {/* 404 route */} +