move build to cmd

This commit is contained in:
Karol Wypchlo 2021-02-20 16:44:12 +01:00
parent 928ff629b4
commit 1c6f8895e7
5 changed files with 7 additions and 3 deletions

1
packages/dashboard/.env Normal file
View File

@ -0,0 +1 @@
SKYNET_PORTAL_API=https://siasky.net

View File

@ -24,6 +24,9 @@ npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
# env defaults
!.env
# local env files # local env files
.env.local .env.local
.env.development.local .env.development.local

View File

@ -7,7 +7,7 @@ import Table from "../components/Table";
import authServerSideProps from "../services/authServerSideProps"; import authServerSideProps from "../services/authServerSideProps";
import { SkynetClient } from "skynet-js"; import { SkynetClient } from "skynet-js";
const skynetClient = new SkynetClient(process.env.SKYNET_PORTAL_API ?? "https://siasky.net"); const skynetClient = new SkynetClient(process.env.SKYNET_PORTAL_API);
const apiPrefix = process.env.NODE_ENV === "development" ? "/api/stubs" : ""; const apiPrefix = process.env.NODE_ENV === "development" ? "/api/stubs" : "";
const fetcher = (url) => fetch(url).then((r) => r.json()); const fetcher = (url) => fetch(url).then((r) => r.json());
const getSkylinkLink = ({ skylink }) => skynetClient.getSkylinkUrl(skylink); const getSkylinkLink = ({ skylink }) => skynetClient.getSkylinkUrl(skylink);

View File

@ -9,7 +9,7 @@ import { SkynetClient } from "skynet-js";
dayjs.extend(relativeTime); dayjs.extend(relativeTime);
const skynetClient = new SkynetClient(process.env.SKYNET_PORTAL_API ?? "https://siasky.net"); const skynetClient = new SkynetClient(process.env.SKYNET_PORTAL_API);
const apiPrefix = process.env.NODE_ENV === "development" ? "/api/stubs" : ""; const apiPrefix = process.env.NODE_ENV === "development" ? "/api/stubs" : "";
const fetcher = (url) => fetch(url).then((r) => r.json()); const fetcher = (url) => fetch(url).then((r) => r.json());

View File

@ -7,7 +7,7 @@ import Table from "../components/Table";
import authServerSideProps from "../services/authServerSideProps"; import authServerSideProps from "../services/authServerSideProps";
import { SkynetClient } from "skynet-js"; import { SkynetClient } from "skynet-js";
const skynetClient = new SkynetClient(process.env.SKYNET_PORTAL_API ?? "https://siasky.net"); const skynetClient = new SkynetClient(process.env.SKYNET_PORTAL_API);
const apiPrefix = process.env.NODE_ENV === "development" ? "/api/stubs" : ""; const apiPrefix = process.env.NODE_ENV === "development" ? "/api/stubs" : "";
const fetcher = (url) => fetch(url).then((r) => r.json()); const fetcher = (url) => fetch(url).then((r) => r.json());
const getSkylinkLink = ({ skylink }) => skynetClient.getSkylinkUrl(skylink); const getSkylinkLink = ({ skylink }) => skynetClient.getSkylinkUrl(skylink);