diff --git a/packages/dashboard-v2/src/services/skynetClient.js b/packages/dashboard-v2/src/services/skynetClient.js index a01e96f9..cb236ade 100644 --- a/packages/dashboard-v2/src/services/skynetClient.js +++ b/packages/dashboard-v2/src/services/skynetClient.js @@ -1,3 +1,6 @@ import { SkynetClient } from "skynet-js"; -export default new SkynetClient(`https://${process.env.GATSBY_PORTAL_DOMAIN}`); +const { NODE_ENV, GATSBY_PORTAL_DOMAIN } = process.env; + +// In production-like environment, let SkynetClient figure out the best portal +export default new SkynetClient(NODE_ENV === "development" ? `https://${GATSBY_PORTAL_DOMAIN}` : undefined);