Skip to content

Commit d2039cf

Browse files
committed
code refactoring
1 parent b0dabf6 commit d2039cf

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

src/Shared/Components/FeatureDescription/FeatureDescriptionModal.tsx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { ReactComponent as ArrowOutSquare } from '../../../Assets/Icon/ic-arrow-
66
import { getImageSize } from './utils'
77

88
export const FeatureDescriptionModal = ({
9-
image,
109
title,
1110
renderDescriptionContent,
1211
closeModalText = BUTTON_TEXT.GOT_IT,
@@ -17,26 +16,9 @@ export const FeatureDescriptionModal = ({
1716
imageStyles = {},
1817
}: FeatureDescriptionModalProps) => {
1918
const renderImage = () => {
20-
if (!image && !SVGImage) {
19+
if (!SVGImage) {
2120
return null
2221
}
23-
if (image) {
24-
return (
25-
<div className="} dc__overflow-auto">
26-
<img
27-
src={image}
28-
style={{
29-
...imageStyles,
30-
width: `${getImageSize(imageVariant).width}`,
31-
height: `${getImageSize(imageVariant).height}`,
32-
}}
33-
className="image-class-name mt-16 mb-12"
34-
alt="feature-description"
35-
/>
36-
image
37-
</div>
38-
)
39-
}
4022
return (
4123
<div className="flexbox dc__align-center dc__justify-center mt-16 mb-12">
4224
<SVGImage

src/Shared/Components/FeatureDescription/FeatureTitleWithInfo.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const FeatureTitleWithInfo = ({
1010
children,
1111
iconClassName,
1212
title,
13-
image,
1413
renderDescriptionContent,
1514
closeModalText,
1615
docLink,
@@ -38,7 +37,6 @@ const FeatureTitleWithInfo = ({
3837
</div>
3938
{showFeatureDescriptionModal && (
4039
<FeatureDescriptionModal
41-
image={image}
4240
title={title}
4341
renderDescriptionContent={renderDescriptionContent}
4442
closeModalText={closeModalText}

src/Shared/Components/FeatureDescription/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { ImageType } from '../../../Common'
22
import { Breadcrumb } from '../../../Common/BreadCrumb/Types'
33

44
export interface FeatureDescriptionModalProps {
5-
image?
65
title: string
76
renderDescriptionContent?: () => JSX.Element
87
closeModalText?: string

0 commit comments

Comments
 (0)