Skip to content

Commit

Permalink
Remove scroll on navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
goncy committed Sep 2, 2024
1 parent 8434050 commit 85ac795
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/store/screens/Store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function StoreScreen({products, selected}: {products: Product[]; selected: null
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
{categoryProducts.length ? (
categoryProducts.map((product) => (
<Link key={product.id} href={`/${product.id}`}>
<Link key={product.id} href={`/${product.id}`} scroll={false}>
<ProductCard product={product} />
</Link>
))
Expand All @@ -169,10 +169,10 @@ function StoreScreen({products, selected}: {products: Product[]; selected: null
<CartItemDrawer
open
item={{...selected!, quantity: 1}}
onClose={() => router.push("/")}
onClose={() => router.push("/", {scroll: false})}
onSubmit={(item) => {
addItem(Date.now(), item);
router.push("/");
router.push("/", {scroll: false});
}}
/>
)}
Expand Down

0 comments on commit 85ac795

Please sign in to comment.