diff options
author | tanhengyeow <E0032242@u.nus.edu> | 2020-06-25 13:06:01 +0800 |
---|---|---|
committer | tanhengyeow <E0032242@u.nus.edu> | 2020-06-25 13:06:01 +0800 |
commit | 00b2a27a58719ac7e02ce3d3019f866bb9195a48 (patch) | |
tree | 30698b2fe090dec70cea4fe1f5ecfc7a793d165c /frontend | |
parent | 073bf67f543be80bf81807d73ea388659ba420fd (diff) | |
download | libeufin-00b2a27a58719ac7e02ce3d3019f866bb9195a48.tar.gz libeufin-00b2a27a58719ac7e02ce3d3019f866bb9195a48.tar.bz2 libeufin-00b2a27a58719ac7e02ce3d3019f866bb9195a48.zip |
Update configs and test script
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/craco.config.js | 1 | ||||
-rw-r--r-- | frontend/src/actions/auth.tsx | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/frontend/craco.config.js b/frontend/craco.config.js index e01c6bae..3d354263 100644 --- a/frontend/craco.config.js +++ b/frontend/craco.config.js @@ -13,6 +13,7 @@ module.exports = { '@menu-item-padding': '0 120px', '@menu-bg': 'none', '@menu-item-font-size': '16px', + '@collapse-content-bg': '#f0f2f5', }, javascriptEnabled: true, }, diff --git a/frontend/src/actions/auth.tsx b/frontend/src/actions/auth.tsx index 31f767fb..5dba687f 100644 --- a/frontend/src/actions/auth.tsx +++ b/frontend/src/actions/auth.tsx @@ -35,7 +35,7 @@ export const login = (nexusURL: string, username: string, password: string) => { if (response.ok) { return response.json(); } - throw 'Cannot connect to server'; + throw new Error('Cannot connect to server'); }) .then(async () => { await window.localStorage.setItem('authenticated', 'true'); @@ -45,8 +45,8 @@ export const login = (nexusURL: string, username: string, password: string) => { ); dispatch(authenticate()); }) - .catch((err) => { - throw new Error(err); + .catch((err: Error) => { + throw err; }); } }; |