diff --git a/src/LoginGate.tsx b/src/LoginGate.tsx index 02e5e58..167681a 100644 --- a/src/LoginGate.tsx +++ b/src/LoginGate.tsx @@ -25,7 +25,6 @@ export default function LoginGate() { const [fetchError, setFetchError] = React.useState(); async function onFormSubmit(username: string, password: string, serviceApiUrl?: string) { - serviceApiUrl = serviceApiUrl ? serviceApiUrl : C.serviceApiBase; try { setFetchError(undefined); const ret = login(username, password, serviceApiUrl); diff --git a/src/constants/index.ts b/src/constants/index.ts index 82e5829..2af7660 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -8,5 +8,3 @@ export const sourceCode = "https://github.com/etesync/etesync-web"; export const reportIssue = sourceCode + "/issues"; export const forgotPassword = "https://www.etesync.com/accounts/password/reset/"; - -export const serviceApiBase = process.env.REACT_APP_DEFAULT_API_PATH || "https://api.etesync.com/"; diff --git a/src/store/actions.ts b/src/store/actions.ts index 1b257e5..7a7d5c5 100644 --- a/src/store/actions.ts +++ b/src/store/actions.ts @@ -23,7 +23,7 @@ export const logout = createAction( export const login = createAction( "LOGIN", - async (username: string, password: string, server: string) => { + async (username: string, password: string, server: string | undefined) => { const etebase = await Etebase.Account.login(username, password, server); return etebase.save(); }