We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75ebe04 commit d95b723Copy full SHA for d95b723
1 file changed
DocuSign.Workspaces/DocuSign.Workspaces/ClientApp/src/components/Layout.js
@@ -4,7 +4,17 @@ import { useTranslation } from 'react-i18next';
4
import LoginModal from '../loginModal/LoginModal';
5
import { ReactComponent as ChevronRightIcon } from '../assets/icons/chevron-right.svg';
6
7
-export const API_BASE = 'https://localhost:5001';
+const resolveApiBase = () => {
8
+ if (process.env.REACT_APP_API_BASE) {
9
+ return process.env.REACT_APP_API_BASE;
10
+ }
11
+ if (typeof window !== 'undefined') {
12
+ return window.location.origin;
13
14
+ return '';
15
+};
16
+
17
+export const API_BASE = resolveApiBase();
18
19
export default function Layout() {
20
const { t } = useTranslation();
0 commit comments