Skip to content

Commit

Permalink
feat: add NoPublishedVersionEmptyState
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhishekA1509 committed Oct 1, 2024
1 parent 15e3aa0 commit e4fafc2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
BaseURLParams,
CodeEditor,
DryRunEditorMode,
GenericEmptyState,
getDeploymentManifest,
MODES,
useAsync,
Expand All @@ -13,9 +12,9 @@ import { importComponentFromFELibrary } from '@Components/common'
import { ReactComponent as ICFilePlay } from '@Icons/ic-file-play.svg'
// FIXME: Placeholder icon since no sense of git merge icon as of now
import { ReactComponent as ICFileCode } from '@Icons/ic-file-code.svg'
import noArtifact from '@Images/[email protected]'
import ToggleResolveScopedVariables from './ToggleResolveScopedVariables'
import { ConfigDryRunProps } from './types'
import NoPublishedVersionEmptyState from './NoPublishedVersionEmptyState'

const DryRunEditorModeSelect = importComponentFromFELibrary('DryRunEditorModeSelect', null, 'function')

Expand Down Expand Up @@ -50,13 +49,7 @@ const ConfigDryRun = ({

const renderEditorBody = () => {
if (isDraftPresent && dryRunEditorMode === DryRunEditorMode.PUBLISHED_VALUES && !isPublishedConfigPresent) {
return (
<GenericEmptyState
image={noArtifact}
title="No published version"
subTitle="Published override for this file does not exist"
/>
)
return <NoPublishedVersionEmptyState />
}

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { GenericEmptyState } from '@devtron-labs/devtron-fe-common-lib'
import noArtifact from '@Images/[email protected]'

const NoPublishedVersionEmptyState = () => (
<GenericEmptyState
image={noArtifact}
title="No published version"
subTitle="Published override for this file does not exist"
/>
)

export default NoPublishedVersionEmptyState

0 comments on commit e4fafc2

Please sign in to comment.