Fix usage the default server URL (actually use it)

This also fixes setting the server url using the REACT_APP_DEFAULT_API_PATH
env var.

Fixes #185
master
Tom Hacohen 4 years ago
parent 1b50d197b1
commit 7a03f8c69c

@ -41,7 +41,7 @@ export default function LoginPage() {
setLoading(true);
setFetchError(undefined);
const etebase = await startTask((async () => {
return await Etebase.Account.login(username, password, serviceApiUrl);
return await Etebase.Account.login(username, password, serviceApiUrl ?? C.defaultServerUrl);
}));
dispatch(login(etebase));
} catch (e) {

@ -87,7 +87,7 @@ export default function SignupPage() {
setErrors({});
}
const serverUrl = (showAdvanced) ? server : undefined;
const serverUrl = (showAdvanced) ? server : C.defaultServerUrl;
const user: Etebase.User = {
username,
email,

Loading…
Cancel
Save