Skip to content

Commit

Permalink
feat: add shortcut to crop from question game
Browse files Browse the repository at this point in the history
  • Loading branch information
teolemon authored Jan 4, 2024
1 parent 310d800 commit f4f029a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/off.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ const offService = {
lang === "en" ? "" : "-" + lang
}.openfoodfacts.org/cgi/product.pl?type=edit&code=${barcode}`;
},

// TODO: Create a UI button allowing to jump to the Crop page by barcode from the question game
getLogoCropsByBarcodeUrl(barcode) {
return `https://hunger.openfoodfacts.org/logos/search?barcode==${barcode}`;
},

getImageUrl(imagePath) {
return combineURLs(OFF_IMAGE_URL, imagePath);
},
Expand Down Expand Up @@ -155,7 +159,7 @@ const offService = {
)}?${urlParams.toString()}`,
);
},

// TODO: fix method name
setIngedrient({ code, lang, text }) {
if (!code) {
console.error("setIngedrient: Missing code");
Expand Down

0 comments on commit f4f029a

Please sign in to comment.