update index.js to use baseUrl

This commit is contained in:
Blake Blackshear 2021-01-19 21:31:17 -06:00
parent 507ec13848
commit 7f4e042dfa

View File

@ -2,4 +2,4 @@ import { createContext } from 'preact';
export const Config = createContext({});
export const ApiHost = createContext(import.meta.env.SNOWPACK_PUBLIC_API_HOST || '');
export const ApiHost = createContext(import.meta.env.SNOWPACK_PUBLIC_API_HOST || window.baseUrl || '');