From 6c17830ade816af7fbd8cae0c65d894248f34d14 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Tue, 13 Apr 2021 13:09:45 +0200 Subject: [PATCH] GATSBY_API_URL --- packages/website/package.json | 3 ++- packages/website/src/components/Uploader/Uploader.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index ee165364..42dc087b 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -73,6 +73,7 @@ "@storybook/react": "^6.2.4", "babel-loader": "^8.2.2", "babel-plugin-inline-react-svg": "^2.0.1", + "cross-env": "^7.0.3", "cypress": "^7.1.0", "cypress-file-upload": "^5.0.5", "prettier": "2.2.1" @@ -83,7 +84,7 @@ "license": "SEE LICENSE IN LICENSE.md", "scripts": { "build": "gatsby build", - "develop": "gatsby develop", + "develop": "GATSBY_API_URL=https://siasky.net gatsby develop", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "start": "npm run develop", "serve": "gatsby serve", diff --git a/packages/website/src/components/Uploader/Uploader.js b/packages/website/src/components/Uploader/Uploader.js index 2ff12ddf..dadd1c64 100644 --- a/packages/website/src/components/Uploader/Uploader.js +++ b/packages/website/src/components/Uploader/Uploader.js @@ -57,7 +57,7 @@ const createUploadErrorMessage = (error) => { return `Critical error, please refresh the application and try again. ${error.message}`; }; -const client = new SkynetClient(); +const client = new SkynetClient(process.env.GATSBY_API_URL); const RegistrationLink = () => (