diff --git a/src/components/FavoritesBar/FavoritesBar.js b/src/components/FavoritesBar/FavoritesBar.js index 4259d3e..cc6d4ae 100644 --- a/src/components/FavoritesBar/FavoritesBar.js +++ b/src/components/FavoritesBar/FavoritesBar.js @@ -63,10 +63,20 @@ const mapStateToProps = (store) => { const username = getJupyterHubUsername(store); const beocatSystem = getBeocatSystems(store)[0]; + const isBeocatSystem = store.router.pathname.indexOf('beocat') !== -1; + + if (!isBeocatSystem) { + return { + username, + beocatSystemUrlPrefix: '', + isBeocatSystem, + } + } + return { username, beocatSystemUrlPrefix: `/files/browse/${beocatSystem.provider}/${beocatSystem.id}/`, - isBeocatSystem: store.router.pathname.indexOf('beocat') !== -1, + isBeocatSystem, }; }; diff --git a/src/store/files/sagas.js b/src/store/files/sagas.js index 38d98d8..44f8990 100644 --- a/src/store/files/sagas.js +++ b/src/store/files/sagas.js @@ -160,6 +160,8 @@ function* uploadFile(action) { const csrfToken = yield select(getCsrf); const ProviderService = resolveProviderService(action.path); yield call(ProviderService.uploadFile, csrfToken, action.file, action.path); + yield call(delay, 3000); // Arbitrary delay for consistency + yield put(fileListActions.pending(action.path)) } catch (e) { console.log(e); // Do something to handle the error