Skip to content

Commit

Permalink
updates fake data location
Browse files Browse the repository at this point in the history
  • Loading branch information
renatolinsdigital committed Sep 3, 2024
1 parent 9f74e74 commit 6f4a50e
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 47 deletions.
46 changes: 46 additions & 0 deletions data/books.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"products": [
{
"id": 1,
"price": 9.99,
"title": "The First Book",
"image": "data/images/book1.png",
"downloadUrl": "data/books/book1.pdf"
},
{
"id": 2,
"price": 12.59,
"title": "The Second Book",
"image": "data/images/book2.png",
"downloadUrl": "data/books/book2.pdf"
},
{
"id": 3,
"price": 29.0,
"title": "The Third Book",
"image": "data/images/book3.png",
"downloadUrl": "data/books/book3.pdf"
},
{
"id": 4,
"price": 19.5,
"title": "The Fourth Book",
"image": "data/images/book4.png",
"downloadUrl": "data/books/book4.pdf"
},
{
"id": 5,
"price": 22.5,
"title": "The Fifth Book",
"image": "data/images/book5.png",
"downloadUrl": "data/books/book5.pdf"
},
{
"id": 6,
"price": 16.9,
"title": "The Sixth Book",
"image": "data/images/book6.png",
"downloadUrl": "data/books/book6.pdf"
}
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
46 changes: 0 additions & 46 deletions src/data/books.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/features/cart/cartThunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const fetchProducts = createAsyncThunk<Product[]>(
'cart/fetchProducts',
async () => {
try {
const response = await axios.get('src/data/books.json');
const response = await axios.get('data/books.json');
return response.data.products;
} catch (error) {
console.error(error);
Expand Down

0 comments on commit 6f4a50e

Please sign in to comment.