ops(dashboard-v2): fix SkynetClient on multi-server portals
This commit is contained in:
parent
e4fe4dd901
commit
babb6a48ad
|
@ -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);
|
||||
|
|
Reference in New Issue