refactor: base origin

This commit is contained in:
Tristan Yang
2023-02-23 22:19:24 +08:00
parent 6d28e7d649
commit d10df4bee5
2 changed files with 8 additions and 6 deletions
+6 -5
View File
@@ -1,11 +1,6 @@
import i18n from '../i18n';
import { Price } from "../types/common";
// const BASE_URL = `http://localhost:3333/api`;
const BASE_URL = process.env.REACT_APP_RELEASE
? `${location.origin}/api`
: `https://dev.voce.chat/api`;
let prices: Price[] = [
{
type: "payment",
@@ -16,6 +11,12 @@ let prices: Price[] = [
type: "booking",
}
];
// export const BASE_ORIGIN = `http://localhost:3333`;
export const BASE_ORIGIN = process.env.REACT_APP_RELEASE
? `${location.origin}`
: `https://dev.voce.chat`;
const BASE_URL = `${BASE_ORIGIN}/api`;
export const getLicensePriceList = () => {
const ps = prices.map((p, idx) => {
switch (idx) {