generated from 202306-NEA-DZ-FEW/capstone-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from 202306-NEA-DZ-FEW/31-single-product-page
Single product page
- Loading branch information
Showing
6 changed files
with
193 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
src/components/ProductDetails/__test__/__snapshots__/ProductDetails.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`renders correctly 1`] = ` | ||
<div> | ||
Loading... | ||
</div> | ||
`; | ||
exports[`renders correctly 1`] = `null`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import ProductDetails from "@/components/ProductDetails/ProductDetails"; | ||
import { useRouter } from "next/router"; | ||
import { CartProvider } from "@/context/CartContext"; | ||
// import MapComponent from "@/components/Map/Map"; | ||
|
||
function SingleProduct() { | ||
const router = useRouter(); | ||
const { productId } = router.query; | ||
|
||
return ( | ||
<div className='relative'> | ||
<ProductDetails productId={productId} /> | ||
|
||
{/* Conditionally render MapComponent based on screen size */} | ||
{/* {productId && ( | ||
<div className="hidden lg:block lg:mt-16 lg:relative lg:z-0"> | ||
<MapComponent productId={productId} /> | ||
</div> | ||
)} */} | ||
</div> | ||
); | ||
} | ||
|
||
export default SingleProduct; |