Skip to content

Commit cb9242b

Browse files
committed
Added BackToTop in App.js
1 parent 46efca7 commit cb9242b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/App.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { Toaster, toast } from "react-hot-toast";
1010
import Navbar from "./component/Navbar";
1111
import Footer from "./component/Footer";
1212
import ScrollToTop from "./component/ScrollToTop";
13+
import BackToTop from "./component/BackToTop";
1314

1415
import Home from "./component/Home";
1516
import Product from "./component/Product";
@@ -200,6 +201,9 @@ const AppWrapper = () => {
200201
</Routes>
201202
</main>
202203

204+
{/* Floating “Back to top” button (appears after scrolling ~400px) */}
205+
<BackToTop threshold={400} />
206+
203207
<Footer />
204208
</div>
205209
</Router>

0 commit comments

Comments
 (0)