fix(dashboard-v2): always set portal domain for SkynetClient

This commit is contained in:
Michał Leszczyk 2022-04-15 16:19:04 +02:00
parent d6fe2d2f1d
commit 7248147ba7
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
1 changed files with 1 additions and 4 deletions

View File

@ -1,6 +1,3 @@
import { SkynetClient } from "skynet-js";
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);
export default new SkynetClient(`https://${process.env.GATSBY_PORTAL_DOMAIN}`);