Skip to content

Commit 75b7f59

Browse files
committed
update url
1 parent ff3cdf1 commit 75b7f59

10 files changed

Lines changed: 69 additions & 65 deletions

File tree

‎20-filters/final/products.js‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,86 +3,86 @@ const products = [
33
id: 'rec43w3ipXvP28vog',
44
title: 'high-back bench',
55
company: 'ikea',
6-
image: 'https://course-api.com/images/store/product-1.jpeg',
6+
image: 'https://www.course-api.com/images/store/product-1.jpeg',
77
price: 9.99,
88
},
99
{
1010
id: 'rec4f2RIftFCb7aHh',
1111
title: 'albany table',
1212
company: 'marcos',
13-
image: 'https://course-api.com/images/store/product-2.jpeg',
13+
image: 'https://www.course-api.com/images/store/product-2.jpeg',
1414
price: 79.99,
1515
},
1616
{
1717
id: 'rec8kkCmSiMkbkiko',
1818
title: 'accent chair',
1919
company: 'caressa',
20-
image: 'https://course-api.com/images/store/product-3.jpeg',
20+
image: 'https://www.course-api.com/images/store/product-3.jpeg',
2121
price: 25.99,
2222
},
2323
{
2424
id: 'recBohCqQsot4Q4II',
2525
title: 'wooden table',
2626
company: 'caressa',
27-
image: 'https://course-api.com/images/store/product-4.jpeg',
27+
image: 'https://www.course-api.com/images/store/product-4.jpeg',
2828

2929
price: 45.99,
3030
},
3131
{
3232
id: 'recDG1JRZnbpRHpoy',
3333
title: 'dining table',
3434
company: 'caressa',
35-
image: 'https://course-api.com/images/store/product-5.jpeg',
35+
image: 'https://www.course-api.com/images/store/product-5.jpeg',
3636

3737
price: 6.99,
3838
},
3939
{
4040
id: 'recNWGyP7kjFhSqw3',
4141
title: 'sofa set',
4242
company: 'liddy',
43-
image: 'https://course-api.com/images/store/product-6.jpeg',
43+
image: 'https://www.course-api.com/images/store/product-6.jpeg',
4444
price: 69.99,
4545
},
4646
{
4747
id: 'recZEougL5bbY4AEx',
4848
title: 'modern bookshelf',
4949
company: 'marcos',
50-
image: 'https://course-api.com/images/store/product-7.jpeg',
50+
image: 'https://www.course-api.com/images/store/product-7.jpeg',
5151
price: 8.99,
5252
},
5353
{
5454
id: 'recjMK1jgTb2ld7sv',
5555
title: 'emperor bed',
5656
company: 'liddy',
57-
image: 'https://course-api.com/images/store/product-8.jpeg',
57+
image: 'https://www.course-api.com/images/store/product-8.jpeg',
5858
price: 21.99,
5959
},
6060
{
6161
id: 'recmg2a1ctaEJNZhu',
6262
title: 'utopia sofa',
6363
company: 'marcos',
64-
image: 'https://course-api.com/images/store/product-9.jpeg',
64+
image: 'https://www.course-api.com/images/store/product-9.jpeg',
6565
price: 39.95,
6666
},
6767
{
6868
id: 'recvKMNR3YFw0bEt3',
6969
title: 'entertainment center',
7070
company: 'liddy',
71-
image: 'https://course-api.com/images/store/product-10.jpeg',
71+
image: 'https://www.course-api.com/images/store/product-10.jpeg',
7272
price: 29.98,
7373
},
7474
{
7575
id: 'recxaXFy5IW539sgM',
7676
title: 'albany sectional',
7777
company: 'ikea',
78-
image: 'https://course-api.com/images/store/product-11.jpeg',
78+
image: 'https://www.course-api.com/images/store/product-11.jpeg',
7979
price: 10.99,
8080
},
8181
{
8282
id: 'recyqtRglGNGtO4Q5',
8383
title: 'leather sofa',
8484
company: 'liddy',
85-
image: 'https://course-api.com/images/store/product-12.jpeg',
85+
image: 'https://www.course-api.com/images/store/product-12.jpeg',
8686
price: 9.99,
8787
},
8888
];

‎20-filters/starter/products.js‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,86 +3,86 @@ const products = [
33
id: 'rec43w3ipXvP28vog',
44
title: 'high-back bench',
55
company: 'ikea',
6-
image: 'https://course-api.com/images/store/product-1.jpeg',
6+
image: 'https://www.course-api.com/images/store/product-1.jpeg',
77
price: 9.99,
88
},
99
{
1010
id: 'rec4f2RIftFCb7aHh',
1111
title: 'albany table',
1212
company: 'marcos',
13-
image: 'https://course-api.com/images/store/product-2.jpeg',
13+
image: 'https://www.course-api.com/images/store/product-2.jpeg',
1414
price: 79.99,
1515
},
1616
{
1717
id: 'rec8kkCmSiMkbkiko',
1818
title: 'accent chair',
1919
company: 'caressa',
20-
image: 'https://course-api.com/images/store/product-3.jpeg',
20+
image: 'https://www.course-api.com/images/store/product-3.jpeg',
2121
price: 25.99,
2222
},
2323
{
2424
id: 'recBohCqQsot4Q4II',
2525
title: 'wooden table',
2626
company: 'caressa',
27-
image: 'https://course-api.com/images/store/product-4.jpeg',
27+
image: 'https://www.course-api.com/images/store/product-4.jpeg',
2828

2929
price: 45.99,
3030
},
3131
{
3232
id: 'recDG1JRZnbpRHpoy',
3333
title: 'dining table',
3434
company: 'caressa',
35-
image: 'https://course-api.com/images/store/product-5.jpeg',
35+
image: 'https://www.course-api.com/images/store/product-5.jpeg',
3636

3737
price: 6.99,
3838
},
3939
{
4040
id: 'recNWGyP7kjFhSqw3',
4141
title: 'sofa set',
4242
company: 'liddy',
43-
image: 'https://course-api.com/images/store/product-6.jpeg',
43+
image: 'https://www.course-api.com/images/store/product-6.jpeg',
4444
price: 69.99,
4545
},
4646
{
4747
id: 'recZEougL5bbY4AEx',
4848
title: 'modern bookshelf',
4949
company: 'marcos',
50-
image: 'https://course-api.com/images/store/product-7.jpeg',
50+
image: 'https://www.course-api.com/images/store/product-7.jpeg',
5151
price: 8.99,
5252
},
5353
{
5454
id: 'recjMK1jgTb2ld7sv',
5555
title: 'emperor bed',
5656
company: 'liddy',
57-
image: 'https://course-api.com/images/store/product-8.jpeg',
57+
image: 'https://www.course-api.com/images/store/product-8.jpeg',
5858
price: 21.99,
5959
},
6060
{
6161
id: 'recmg2a1ctaEJNZhu',
6262
title: 'utopia sofa',
6363
company: 'marcos',
64-
image: 'https://course-api.com/images/store/product-9.jpeg',
64+
image: 'https://www.course-api.com/images/store/product-9.jpeg',
6565
price: 39.95,
6666
},
6767
{
6868
id: 'recvKMNR3YFw0bEt3',
6969
title: 'entertainment center',
7070
company: 'liddy',
71-
image: 'https://course-api.com/images/store/product-10.jpeg',
71+
image: 'https://www.course-api.com/images/store/product-10.jpeg',
7272
price: 29.98,
7373
},
7474
{
7575
id: 'recxaXFy5IW539sgM',
7676
title: 'albany sectional',
7777
company: 'ikea',
78-
image: 'https://course-api.com/images/store/product-11.jpeg',
78+
image: 'https://www.course-api.com/images/store/product-11.jpeg',
7979
price: 10.99,
8080
},
8181
{
8282
id: 'recyqtRglGNGtO4Q5',
8383
title: 'leather sofa',
8484
company: 'liddy',
85-
image: 'https://course-api.com/images/store/product-12.jpeg',
85+
image: 'https://www.course-api.com/images/store/product-12.jpeg',
8686
price: 9.99,
8787
},
8888
];

‎21-dad-jokes/final/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
[What is an API?](https://www.freecodecamp.org/news/what-is-an-api-in-english-please-b880a3214a82/)
1616

17-
- https://course-api.com/javascript-store-products
17+
- https://www.course-api.com/javascript-store-products
1818
- get store products
1919

20-
- https://course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog
20+
- https://www.course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog
2121
- get single store product
2222

2323
- https://randomuser.me/api/

‎21-dad-jokes/starter/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
[What is an API?](https://www.freecodecamp.org/news/what-is-an-api-in-english-please-b880a3214a82/)
1616

17-
- https://course-api.com/javascript-store-products
17+
- https://www.course-api.com/javascript-store-products
1818
- get store products
1919

20-
- https://course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog
20+
- https://www.course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog
2121
- get single store product
2222

2323
- https://randomuser.me/api/

‎22-products/final/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727

2828
#### API Docs
2929

30-
- (Course API)[https://course-api.com/]
30+
- (Course API)[https://www.course-api.com/]
3131

32-
- (Products)[https://course-api.com/javascript-store-products]
32+
- (Products)[https://www.course-api.com/javascript-store-products]
3333

34-
- (Single Product)[https://course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog]
34+
- (Single Product)[https://www.course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog]
3535

3636
#### Fetch Products
3737

‎22-products/final/app.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const url = 'https://course-api.com/javascript-store-products';
1+
const url = 'https://www.course-api.com/javascript-store-products';
22

33
const productsDOM = document.querySelector('.products-center');
44

‎22-products/final/product.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const productDOM = document.querySelector('.product');
2-
const url = 'https://course-api.com/javascript-store-single-product';
2+
const url = 'https://www.course-api.com/javascript-store-single-product';
33

44
const fetchProduct = async () => {
55
try {

‎22-products/starter/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727

2828
#### API Docs
2929

30-
- (Course API)[https://course-api.com/]
30+
- (Course API)[https://www.course-api.com/]
3131

32-
- (Products)[https://course-api.com/javascript-store-products]
32+
- (Products)[https://www.course-api.com/javascript-store-products]
3333

34-
- (Single Product)[https://course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog]
34+
- (Single Product)[https://www.course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog]
3535

3636
#### Fetch Products
3737

‎29-comfy-store/final/src/utils.js‎

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,41 @@
33
// DATA IS THE SAME JUST A DIFFERENT URL,
44
// DOES NOT AFFECT PROJECT FUNCTIONALITY
55

6-
const allProductsUrl = 'https://course-api.com/javascript-store-products'
6+
const allProductsUrl = 'https://www.course-api.com/javascript-store-products';
77
// temporary single product
8-
// 'https://course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog'
8+
// 'https://www.course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog'
99
const singleProductUrl =
10-
'https://course-api.com/javascript-store-single-product'
10+
'https://www.course-api.com/javascript-store-single-product';
1111

1212
const getElement = (selection) => {
13-
const element = document.querySelector(selection)
14-
if (element) return element
15-
throw new Error(`Please check "${selection}" selector, no such element exist`)
16-
}
13+
const element = document.querySelector(selection);
14+
if (element) return element;
15+
throw new Error(
16+
`Please check "${selection}" selector, no such element exist`
17+
);
18+
};
1719

1820
const formatPrice = (price) => {
1921
let formattedPrice = new Intl.NumberFormat('en-US', {
2022
style: 'currency',
2123
currency: 'USD',
22-
}).format((price / 100).toFixed(2))
23-
return formattedPrice
24-
}
24+
}).format((price / 100).toFixed(2));
25+
return formattedPrice;
26+
};
2527

2628
const getStorageItem = (item) => {
27-
let storageItem = localStorage.getItem(item)
29+
let storageItem = localStorage.getItem(item);
2830
if (storageItem) {
29-
storageItem = JSON.parse(localStorage.getItem(item))
31+
storageItem = JSON.parse(localStorage.getItem(item));
3032
} else {
31-
storageItem = []
33+
storageItem = [];
3234
}
33-
return storageItem
34-
}
35+
return storageItem;
36+
};
3537

3638
const setStorageItem = (name, item) => {
37-
localStorage.setItem(name, JSON.stringify(item))
38-
}
39+
localStorage.setItem(name, JSON.stringify(item));
40+
};
3941

4042
export {
4143
allProductsUrl,
@@ -44,4 +46,4 @@ export {
4446
formatPrice,
4547
getStorageItem,
4648
setStorageItem,
47-
}
49+
};

‎29-comfy-store/starter/src/utils.js‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,24 @@
33
// DATA IS THE SAME JUST A DIFFERENT URL,
44
// DOES NOT AFFECT PROJECT FUNCTIONALITY
55

6-
const allProductsUrl = 'https://course-api.com/javascript-store-products'
6+
const allProductsUrl = 'https://www.course-api.com/javascript-store-products';
77
// temporary single product
8-
// 'https://course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog'
8+
// 'https://www.course-api.com/javascript-store-single-product?id=rec43w3ipXvP28vog'
99
const singleProductUrl =
10-
'https://course-api.com/javascript-store-single-product'
10+
'https://www.course-api.com/javascript-store-single-product';
1111

1212
const getElement = (selection) => {
13-
const element = document.querySelector(selection)
14-
if (element) return element
15-
throw new Error(`Please check "${selection}" selector, no such element exist`)
16-
}
13+
const element = document.querySelector(selection);
14+
if (element) return element;
15+
throw new Error(
16+
`Please check "${selection}" selector, no such element exist`
17+
);
18+
};
1719

18-
const formatPrice = () => {}
20+
const formatPrice = () => {};
1921

20-
const getStorageItem = () => {}
21-
const setStorageItem = () => {}
22+
const getStorageItem = () => {};
23+
const setStorageItem = () => {};
2224

2325
export {
2426
allProductsUrl,
@@ -27,4 +29,4 @@ export {
2729
formatPrice,
2830
getStorageItem,
2931
setStorageItem,
30-
}
32+
};

0 commit comments

Comments
 (0)