diff --git a/example/src/modules/ImageCrush.js b/example/src/modules/ImageCrush.js index 71ee915..775e4ad 100644 --- a/example/src/modules/ImageCrush.js +++ b/example/src/modules/ImageCrush.js @@ -42,9 +42,13 @@ const ImageCrush = ({ const imageUrl = `${baseServiceUrl}?width=${_width}&height=${_height}&original_uri=${encodeURIComponent( url )}`; - const key = getKey(); + const key = getKey() ? getKey() : process.env.NODE_ENV === "development" ? 'test-key' : ''; let headers = {}; + if (process.env.NODE_ENV === "development" && !getKey()) { + console.log(' Key is not present, please go to console.assetcrush.com and sign up to get one.') + } + fetch(imageUrl, { headers: { "assetcrush-key": key, "ac-env": acEnv, ...headers } }) .then((r) => { headers = r.headers; diff --git a/package.json b/package.json index 1cb571b..4431901 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@assetcrush/reactjs-sdk", - "version": "0.1.4", + "version": "0.1.5", "description": "A simple reactjs library to resize image on fly", "main": "dist/index.js", "types": "index.d.ts",