forked from vtex-apps/minicart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implementare fleg * Implementing SGR (#2)
- Loading branch information
1 parent
b0d3e04
commit 3dcfd0f
Showing
9 changed files
with
242 additions
and
1,187 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,18 @@ | ||
interface FetchWithRetry { | ||
(url: string, retries: number): Promise<PackagesSkuIds> | ||
} | ||
|
||
export const fetchWithRetry: FetchWithRetry = (url: string, retries: number) => | ||
fetch(url) | ||
.then(res => { | ||
if (res.ok) { | ||
return res.json() | ||
} | ||
|
||
if (retries > 0) { | ||
return fetchWithRetry(url, retries - 1) | ||
} | ||
|
||
throw new Error(`Failed to fetch: ${url}`) | ||
}) | ||
.catch(error => console.error(error.message)) |
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,6 +1,6 @@ | ||
{ | ||
"name": "vtex.minicart", | ||
"version": "2.67.1", | ||
"name": "auchan.minicart", | ||
"version": "0.0.1", | ||
"description": "A MiniCart Component.", | ||
"scripts": { | ||
"pretest": "yarn", | ||
|
@@ -17,30 +17,31 @@ | |
"@vtex/test-tools": "^3.1.0", | ||
"@vtex/tsconfig": "^0.4.4", | ||
"apollo-cache-inmemory": "^1.6.5", | ||
"auchan.checkout-summary": "https://narcissgr--auchanqa.myvtex.com/_v/private/typings/linked/v1/[email protected]+build1702379716/public/@types/auchan.checkout-summary", | ||
"auchan.minicart": "https://narcissgr--auchanqa.myvtex.com/_v/private/typings/linked/v1/[email protected]+build1702379665/public/@types/auchan.minicart", | ||
"auchan.product-list": "https://narcissgr--auchanqa.myvtex.com/_v/private/typings/linked/v1/[email protected]+build1702379804/public/@types/auchan.product-list", | ||
"babel-eslint": "^10.1.0", | ||
"typescript": "3.9.7", | ||
"vtex.checkout-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected].0/public/@types/vtex.checkout-graphql", | ||
"vtex.checkout-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected].3/public/@types/vtex.checkout-graphql", | ||
"vtex.checkout-resources": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.checkout-resources", | ||
"vtex.checkout-summary": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.checkout-summary", | ||
"vtex.css-handles": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.css-handles", | ||
"vtex.device-detector": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.device-detector", | ||
"vtex.flex-layout": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected].0/public/@types/vtex.flex-layout", | ||
"vtex.order-items": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected].21/public/@types/vtex.order-items", | ||
"vtex.flex-layout": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected].3/public/@types/vtex.flex-layout", | ||
"vtex.order-items": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected].23/public/@types/vtex.order-items", | ||
"vtex.order-manager": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.order-manager", | ||
"vtex.pixel-manager": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.pixel-manager", | ||
"vtex.product-list": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.product-list", | ||
"vtex.product-summary": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.product-summary", | ||
"vtex.product-summary": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.product-summary", | ||
"vtex.react-portal": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.react-portal", | ||
"vtex.render-runtime": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.133.0/public/@types/vtex.render-runtime", | ||
"vtex.render-runtime": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.134.2/public/@types/vtex.render-runtime", | ||
"vtex.responsive-values": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.responsive-values", | ||
"vtex.rich-text": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.rich-text", | ||
"vtex.sandbox": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.sandbox", | ||
"vtex.store-components": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-components@3.167.0/public/@types/vtex.store-components", | ||
"vtex.store-drawer": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected].2/public/@types/vtex.store-drawer", | ||
"vtex.store-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-graphql@2.161.2/public/@types/vtex.store-graphql", | ||
"vtex.store-components": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-components@3.170.0/public/@types/vtex.store-components", | ||
"vtex.store-drawer": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected].3/public/@types/vtex.store-drawer", | ||
"vtex.store-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-graphql@2.170.1/public/@types/vtex.store-graphql", | ||
"vtex.store-icons": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.store-icons", | ||
"vtex.store-resources": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-resources@0.89.0/public/@types/vtex.store-resources", | ||
"vtex.styleguide": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected].3/public/@types/vtex.styleguide" | ||
"vtex.store-resources": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-resources@0.93.0/public/@types/vtex.store-resources", | ||
"vtex.styleguide": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected].9/public/@types/vtex.styleguide" | ||
}, | ||
"dependencies": { | ||
"apollo-client": "2.6.4", | ||
|
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 @@ | ||
interface PackagesSkuIds { | ||
data: { | ||
bagsSettings: { | ||
bioFlegBagId: string | ||
insulationBagId: string | ||
plasticBagId: string | ||
paperBagId: string | ||
} | ||
sgrSettings: { | ||
aluminumCanProducts: { | ||
label: string | ||
skuIds: string[] | ||
} | ||
glassBottleProducts: { | ||
label: string | ||
skuIds: string[] | ||
} | ||
plasticBottleProducts: { | ||
label: string | ||
skuIds: string[] | ||
} | ||
} | ||
} | ||
error: null | string | ||
} |
Oops, something went wrong.