Skip to content

Commit b6ac685

Browse files
authored
Merge pull request #433 from devtron-labs/fix/deployment-diff
fix: diff viewer title issue
2 parents 50ed399 + 5793260 commit b6ac685

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.1.8",
3+
"version": "1.1.9",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,11 @@ export const DeploymentConfigDiffMain = ({
194194
<DiffViewer
195195
oldValue={primaryList.codeEditorValue.value}
196196
newValue={secondaryList.codeEditorValue.value}
197-
leftTitle={primaryHeading}
198-
rightTitle={secondaryHeading}
197+
// Need to hide the title since the null state is controlled explicitly
198+
{...(primaryList.codeEditorValue.value !== secondaryList.codeEditorValue.value && {
199+
leftTitle: primaryHeading,
200+
rightTitle: secondaryHeading,
201+
})}
199202
codeFoldMessageRenderer={renderDiffViewNoDifferenceState(
200203
primaryList.codeEditorValue.value,
201204
secondaryList.codeEditorValue.value,

0 commit comments

Comments
 (0)