From ee643c1f40b59aa6350926bda59f2f9053c52c25 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Thu, 6 May 2021 12:49:26 +0530 Subject: [PATCH] label overlap in errors --- frontend/app/Router.js | 4 ++-- .../components/Errors/Error/DistributionBar.js | 16 ++++++++++------ frontend/app/duck/user.js | 3 +-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/frontend/app/Router.js b/frontend/app/Router.js index 4885aa27f..f66e0fda6 100644 --- a/frontend/app/Router.js +++ b/frontend/app/Router.js @@ -55,14 +55,14 @@ const ONBOARDING_PATH = routes.onboarding(); const jwt = state.get('jwt'); const changePassword = state.getIn([ 'user', 'account', 'changePassword' ]); const userInfoLoading = state.getIn([ 'user', 'fetchUserInfoRequest', 'loading' ]); - const fetchingTenants = state.get('user', 'fetchTenantsRequest', 'loading'); + // const fetchingTenants = state.get('user', 'fetchTenantsRequest', 'loading'); return { jwt, siteId, changePassword, sites: state.getIn([ 'user', 'client', 'sites' ]), isLoggedIn: jwt !== null && !changePassword, - loading: siteId === null || userInfoLoading || fetchingTenants, + loading: siteId === null || userInfoLoading, email: state.getIn([ 'user', 'account', 'email' ]), account: state.getIn([ 'user', 'account' ]), organisation: state.getIn([ 'user', 'client', 'name' ]), diff --git a/frontend/app/components/Errors/Error/DistributionBar.js b/frontend/app/components/Errors/Error/DistributionBar.js index 8e3c168b2..413d38ecb 100644 --- a/frontend/app/components/Errors/Error/DistributionBar.js +++ b/frontend/app/components/Errors/Error/DistributionBar.js @@ -1,5 +1,5 @@ import cn from 'classnames'; -import { Popup } from 'UI'; +import { Popup, TextEllipsis } from 'UI'; import { Styles } from '../../Dashboard/Widgets/common'; import cls from './distributionBar.css'; import { colorScale } from 'App/utils'; @@ -15,11 +15,15 @@ function DistributionBar({ className, title, partitions }) { return (
- { title } - - { partitions[0].label } - { `${ Math.round(partitions[0].prc) }% ` } - +
{ title }
+
+
+ +
+
{ `${ Math.round(partitions[0].prc) }% ` }
+
{ partitions.map((p, index) => diff --git a/frontend/app/duck/user.js b/frontend/app/duck/user.js index 3dad02a10..f7ed2b1a2 100644 --- a/frontend/app/duck/user.js +++ b/frontend/app/duck/user.js @@ -87,11 +87,10 @@ export default withRequestState({ updatePasswordRequest: UPDATE_PASSWORD, requestResetPassowrd: REQUEST_RESET_PASSWORD, resetPassword: RESET_PASSWORD, - fetchUserInfoRequest: [ FETCH_ACCOUNT, FETCH_CLIENT ], + fetchUserInfoRequest: [ FETCH_ACCOUNT, FETCH_CLIENT, FETCH_TENANTS ], putClientRequest: PUT_CLIENT, updateAccountRequest: UPDATE_ACCOUNT, updateAppearance: UPDATE_APPEARANCE, - fetchTenantsRequest: FETCH_TENANTS, }, reducer); export const login = params => dispatch => dispatch({