Skip to content

Commit

Permalink
wizard: use proper image type label in review step
Browse files Browse the repository at this point in the history
In the review step the image type displays  as the image type's
label. It was displaying as the image type's name which is less
descriptive than the label.
  • Loading branch information
jkozol committed Jul 13, 2020
1 parent 42248fc commit 5e1567e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/Wizard/CreateImageUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ class CreateImageUploadModal extends React.Component {
imageName={this.state.imageName}
imageSize={this.state.imageSize}
imageType={this.state.imageType}
imageTypes={this.props.imageTypes}
minImageSize={this.state.minImageSize}
maxImageSize={this.state.maxImageSize}
uploadService={this.state.uploadService}
Expand Down
7 changes: 6 additions & 1 deletion components/Wizard/ReviewStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class ReviewStep extends React.PureComponent {
imageName,
imageSize,
imageType,
imageTypes,
minImageSize,
maxImageSize,
missingRequiredFields,
Expand Down Expand Up @@ -280,7 +281,9 @@ class ReviewStep extends React.PureComponent {
<TextListItem component={TextListItemVariants.dt}>
<FormattedMessage defaultMessage="Image type" />
</TextListItem>
<TextListItem component={TextListItemVariants.dd}>{imageType}</TextListItem>
<TextListItem component={TextListItemVariants.dd}>
{imageTypes.find((type) => type.name === imageType).label}
</TextListItem>
</TextList>
</TextContent>
{awsReviewStep}
Expand All @@ -294,6 +297,7 @@ ReviewStep.propTypes = {
intl: intlShape.isRequired,
imageName: PropTypes.string,
imageType: PropTypes.string,
imageTypes: PropTypes.arrayOf(PropTypes.object),
imageSize: PropTypes.number,
minImageSize: PropTypes.number,
maxImageSize: PropTypes.number,
Expand All @@ -305,6 +309,7 @@ ReviewStep.propTypes = {
ReviewStep.defaultProps = {
imageName: "",
imageType: "",
imageTypes: [],
imageSize: undefined,
minImageSize: 0,
maxImageSize: 2000,
Expand Down

0 comments on commit 5e1567e

Please sign in to comment.