From 1877afca501f5cf976fd9d6d95cbd12d5878e359 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 6 Aug 2020 10:56:18 +0300 Subject: [PATCH] Remove wrong hardcoded url. --- src/LoginGate.tsx | 1 - src/constants/index.ts | 2 -- src/store/actions.ts | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) 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(); }