dynamic routing for individual product pages

This commit is contained in:
2022-06-01 17:10:19 -05:00
parent f753e9e2dc
commit b428abb6ed
6 changed files with 50 additions and 11 deletions

View File

@@ -56,3 +56,14 @@ export const getAllProducts = async () => {
return serverCall;
}
export const getProductDetails = async (productID: string) => {
let serverCall = await fetch(`http://localhost:8088/products/${productID}`, {
method: "GET",
headers: {
"Content-Type": "application/json"
}
}).then(res => res.json());
return serverCall;
}