From 184a711d48abda92a87cc63e9860761455e2c8b8 Mon Sep 17 00:00:00 2001 From: Lenvin Gonsalves Date: Fri, 24 Apr 2020 23:53:22 +0530 Subject: [PATCH] refactor(*): code cleanup,remove unecessary CSS - i320 Signed-off-by: Lenvin Gonsalves --- src/ErrorLogger/Error.js | 13 +++++-------- src/ErrorLogger/index.js | 6 +++--- src/ErrorLogger/styles.js | 2 -- src/Navigation/generators.js | 8 ++++---- src/Navigation/styles.js | 1 - src/TemplateLibrary/Components/TemplateCard.js | 6 +++--- src/TemplateLibrary/index.js | 4 ++-- 7 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/ErrorLogger/Error.js b/src/ErrorLogger/Error.js index 107fdb97..64b8380b 100644 --- a/src/ErrorLogger/Error.js +++ b/src/ErrorLogger/Error.js @@ -24,32 +24,29 @@ const ErrorComponent = (props) => { onClick: handleClickSpecError, }; - const fullMessageProps = { - }; - const errorArrowProps = { expanded: specErrorVisible, onClick: handleClickSpecError, }; return ( - + - errorNav(error)} className={'errorFile'}> + errorNav(error)} className='errorFile'> {ACT.typeSwitchCase(error || {})} - + {ACT.overalltypeSwitchCase(error).name || 'Unknown Error'}: - + {ACT.truncateMessage(ACT.overalltypeSwitchCase(error).shortMessage || 'Unknown Error')} {specErrorVisible - && + && {ACT.overalltypeSwitchCase(error).message || 'Unknown Error'} } diff --git a/src/ErrorLogger/index.js b/src/ErrorLogger/index.js index 86012c8f..389a419f 100644 --- a/src/ErrorLogger/index.js +++ b/src/ErrorLogger/index.js @@ -53,15 +53,15 @@ const ErrorLogger = (props) => { return ( {errorsVisible - && + && {errorComponentGenerator(errors)} } - + {ACT.gtZero(errorLength) && } {ACT.errorArrayLength(errors)} {ACT.isMultipleErrors(errors)} - + ); diff --git a/src/ErrorLogger/styles.js b/src/ErrorLogger/styles.js index a8c03eeb..eb9034b1 100644 --- a/src/ErrorLogger/styles.js +++ b/src/ErrorLogger/styles.js @@ -11,13 +11,11 @@ export const ErrorDisplay = styled.div` overflow-y: scroll; background-color: #1E2D53; box-shadow: 0 -2px 20px 0 rgba(20,31,60,0.65); - z-index: auto; `; ErrorDisplay.displayName = 'ErrorDisplay'; export const ErrorsHeader = styled.div` - z-index: auto; width: 100%; position: fixed; transition: 1s; diff --git a/src/Navigation/generators.js b/src/Navigation/generators.js index 11807df1..121fab9e 100644 --- a/src/Navigation/generators.js +++ b/src/Navigation/generators.js @@ -23,7 +23,7 @@ export const headerGenerator = (props) => { navigateHeader(key, type)} - className={'navHeaderClause'} + className='navHeaderClause' > {text} @@ -33,7 +33,7 @@ export const headerGenerator = (props) => { navigateHeader(key, type)} - className={'navHeaderH1'} + className='navHeaderH1' > {text} @@ -43,7 +43,7 @@ export const headerGenerator = (props) => { navigateHeader(key, type)} - className={'navHeaderH2'} + className='navHeaderH2' > {text} @@ -53,7 +53,7 @@ export const headerGenerator = (props) => { navigateHeader(key, type)} - className={'navHeaderH3'} + className='navHeaderH3' > {text} diff --git a/src/Navigation/styles.js b/src/Navigation/styles.js index 4b6dd806..94b5f786 100644 --- a/src/Navigation/styles.js +++ b/src/Navigation/styles.js @@ -5,7 +5,6 @@ import styled from 'styled-components'; export const NavigationWrapper = styled.div` position: static; - top: auto; max-height: 80vh; width: inherit; background-color: inherit; diff --git a/src/TemplateLibrary/Components/TemplateCard.js b/src/TemplateLibrary/Components/TemplateCard.js index 3b2c3e00..52e9af36 100644 --- a/src/TemplateLibrary/Components/TemplateCard.js +++ b/src/TemplateLibrary/Components/TemplateCard.js @@ -47,11 +47,11 @@ const DescriptionContainer = styled(Card.Description)` const TemplateCard = props => ( - + <Title className='templateCardTitle'> { props.template.displayName ? props.template.displayName @@ -59,7 +59,7 @@ const TemplateCard = props => ( } <Version>v {props.template.version}</Version> - + {props.template.description} diff --git a/src/TemplateLibrary/index.js b/src/TemplateLibrary/index.js index dff8a532..00e41ab4 100644 --- a/src/TemplateLibrary/index.js +++ b/src/TemplateLibrary/index.js @@ -127,7 +127,7 @@ const TemplateLibraryComponent = (props) => {
- Clause Templates + Clause Templates {props.import && } @@ -136,7 +136,7 @@ const TemplateLibraryComponent = (props) => {
- + {props.addTemp && }