Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Chong <[email protected]>
  • Loading branch information
keithchong committed Nov 1, 2024
1 parent e74f1a7 commit 007949c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export const ApplicationDeploymentHistoryDetails = ({app, info, index}: props) =
return (
<div
id={i ? `'hide-parameters-'${i}` : 'hide-parameters'}
key={i ? `'hide-parameters-'${i}` : 'hide-parameters2'}
className='settings-overview__redirect-panel collapsed-section'
key={i ? `'hide-parameters-'${i}` : 'hide-parameters'}
className='settings-overview__redirect-panel collapsible-section'
onClick={() => {
setShowParameterDetails(!showParameterDetails);
updateMap(i);
Expand Down Expand Up @@ -104,7 +104,7 @@ export const ApplicationDeploymentHistoryDetails = ({app, info, index}: props) =
/>

{showParameterDetails ? (
<div id={`'history-expanded'`} key={`'history-expanded'`} className={classNames('white-box', 'expanded-section')}>
<div id={`'history-expanded'`} key={`'history-expanded'`} className={classNames('white-box', 'collapsible-section')}>
{getExpandedSection()}
<DataLoader
errorRenderer={err => {
Expand Down Expand Up @@ -155,8 +155,8 @@ export const ApplicationDeploymentHistoryDetails = ({app, info, index}: props) =
versionId={recentDeployments[index].id}
/>
{showSourceDetails.includes(i) ? (
<div id={`'history-expanded-'${i}`} key={`'history-expanded-'${i}`} className={classNames('white-box', 'expanded-section')}>
<div id={`'history-expanded-'${i}`} key={`'history-expanded-'${i}`} className='white-box__details' style={{marginBottom: '0px'}}>
<div id={`'history-expanded-'${i}`} key={`'history-expanded-'${i}`} className={classNames('white-box', 'collapsible-section')}>
<div id={`'history-expanded-'${i}`} key={`'history-expanded-'${i}`} className='white-box__details'>
{getExpandedSection(i)}
<DataLoader
errorRenderer={err => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
margin-left: -1em;
}

.collapsed-section {
.collapsible-section {
margin-top: 20px;
padding: 20px;
border: 1px solid;
Expand All @@ -58,18 +58,6 @@
}
}

.expanded-section {
margin-top: 20px;
padding: 20px;
border: 2px solid;
box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.1);
border-radius: '4px';
@include themify($themes) {
border-color: themed('border');
box-shadow: themed('shadow');
}
}

.separator {
height: 2px;
margin: 1em 0;
Expand Down

0 comments on commit 007949c

Please sign in to comment.