Skip to content

Commit 35e7842

Browse files
committed
scroll to top on product click
1 parent 87a2696 commit 35e7842

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

frontend/src/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ function App() {
150150
/>
151151
<ProductGrid
152152
products={filteredProducts}
153-
onProductClick={setSelectedProduct}
153+
onProductClick={(product) => { setSelectedProduct(product); window.scrollTo({ top: 0, behavior: 'smooth' }); }}
154154
onToggleWishlist={toggleWishlist}
155155
isWishlisted={isWishlisted}
156156
/>

0 commit comments

Comments
 (0)