Next.js Discord

Discord Forum

Server side rendering

Unanswered
Nile Crocodile posted this in #help-forum
Open in Discord
Nile CrocodileOP
i have productlist page with product cards. When on click on product card it will redirect me to productDetails. when i click on back buttom which takes me to productList page.
am still on productList page for few seconds and get redirect to product list page.

``` const ProductList=()=>{
const products = await getProducts();


return (
<suspense>

{products.map(product=>
<Link to="/productDetail/${product.id}>
<ProductCard/>
</Link>
}
</suspense>
)
}

const ProductDetails=({param})=>{
const productDetials = await getProductDetails(param)
return (
<div>
<Link to="/productList>
{productDetails.name}
</Link>


</div>


)

}


why its taking stay on same page if i click on back button in productDetials page

0 Replies